Skip to content

Commit a055076

Browse files
fix: make root postinstall resilient when parquet-wasm is absent (#897)
## Problem The `publish: datatype parser` workflow ([failing run](https://github.com/ClickHouse/clickhouse-js/actions/runs/28300601707/job/83848134306)) fails at the `npm ci` step: ``` sh: 1: cd: can't cd to node_modules/parquet-wasm npm error command failed npm error command sh -c cd node_modules/parquet-wasm && npm pkg delete type ``` The job runs `npm ci` with `working-directory: packages/datatype-parser`. Because that package has no lockfile of its own, npm resolves to the **root workspace** install, which fires the root `postinstall`. In that scoped install `parquet-wasm` (a test-only root devDependency, unrelated to the datatype-parser package) isn't present, so `cd node_modules/parquet-wasm` exits non-zero and aborts the whole install — the publish job never reaches its build step. ## Fix Guard the root `postinstall` so it skips cleanly when `parquet-wasm` is absent instead of hard-failing: ```json "postinstall": "cd node_modules/parquet-wasm 2>/dev/null && npm pkg delete type || true", ``` This is harmless for the normal full dev install (dir present → runs as before) and unblocks any `npm ci` that doesn't pull in `parquet-wasm`, including this publish workflow. ## Follow-up The publish workflow dispatches from the protected `release` branch, so after this merges to `main`, `release` needs to be updated to the new snapshot before re-dispatching the publish. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c85f066 commit a055076

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"test:web:all": "TEST_MODE=all vitest -c vitest.web.config.ts",
4747
"test:web:coverage": "VITEST_COVERAGE=true TEST_MODE=all vitest -c vitest.web.config.ts",
4848
"//": "See https://github.com/kylebarron/parquet-wasm/issues/798",
49-
"postinstall": "cd node_modules/parquet-wasm && npm pkg delete type",
49+
"postinstall": "cd node_modules/parquet-wasm 2>/dev/null && npm pkg delete type || true",
5050
"prepare": "husky"
5151
},
5252
"devDependencies": {

0 commit comments

Comments
 (0)