-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
un-ts/napi-postinstall
#27Description
I updated eslint-import-resolver-typescript which uses the latest version of this package. My Docker build using Alpine Linux started failing with this:
#24 33.61 .../node_modules/unrs-resolver postinstall: [napi-postinstall@0.2.2] Failed to find package "@unrs/resolver-binding-linux-x64-musl" on the file system
#24 33.61 .../node_modules/unrs-resolver postinstall: This can happen if you use the "--no-optional" flag. The "optionalDependencies"
#24 33.61 .../node_modules/unrs-resolver postinstall: package.json feature is used by unrs-resolver to install the correct napi binary
#24 33.61 .../node_modules/unrs-resolver postinstall: for your current platform. This install script will now attempt to work around
#24 33.61 .../node_modules/unrs-resolver postinstall: this. If that fails, you need to remove the "--no-optional" flag to use unrs-resolver.
#24 33.61 .../node_modules/unrs-resolver postinstall: [napi-postinstall@0.2.2] Trying to install package "@unrs/resolver-binding-linux-x64-musl" using npm
#24 33.61 .../node_modules/unrs-resolver postinstall: [napi-postinstall@0.2.2] Failed to install package "@unrs/resolver-binding-linux-x64-musl" using npm Cannot find module 'unrs-resolver/package.json'
#24 33.61 .../node_modules/unrs-resolver postinstall: Require stack:
#24 33.61 .../node_modules/unrs-resolver postinstall: - /app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/napi-postinstall/lib/index.js
#24 33.61 .../node_modules/unrs-resolver postinstall: - /app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/napi-postinstall/lib/cli.js
#24 33.79 .../node_modules/unrs-resolver postinstall: [napi-postinstall@0.2.2] Trying to download "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.2.tgz"
#24 33.86 .../farmhash@3.3.1/node_modules/farmhash install: Done
#24 33.92 .../node_modules/unrs-resolver postinstall: [napi-postinstall@0.2.2] Failed to download "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.2.tgz" ENOENT: no such file or directory, open '/app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/unrs-resolver/resolver.linux-x64-musl.node'
#24 33.92 .../node_modules/unrs-resolver postinstall: /app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/napi-postinstall/lib/index.js:227
#24 33.92 .../node_modules/unrs-resolver postinstall: throw new Error((0, helpers_js_1.errorMessage)(`Failed to install package "${pkg}"`, (0, helpers_js_1.getErrorMessage)(err)));
#24 33.92 .../node_modules/unrs-resolver postinstall: ^
#24 33.92 .../node_modules/unrs-resolver postinstall: Error: [napi-postinstall@0.2.2] Failed to install package "@unrs/resolver-binding-linux-x64-musl": ENOENT: no such file or directory, open '/app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/unrs-resolver/resolver.linux-x64-musl.node'
#24 33.92 .../node_modules/unrs-resolver postinstall: at checkAndPreparePackage (/app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/napi-postinstall/lib/index.js:227:27)
#24 33.92 .../node_modules/unrs-resolver postinstall: at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
#24 33.92 .../node_modules/unrs-resolver postinstall: Node.js v23.11.0
#24 33.92 .../node_modules/unrs-resolver postinstall: Failed
#24 33.99 ELIFECYCLE Command failed with exit code 1.
#24 ERROR: process "/bin/sh -c pnpm fetch" did not complete successfully: exit code: 1
------
> [base 14/25] RUN --mount=type=cache,id=pnpm,target=/***/.local/share/pnpm/store pnpm fetch:
33.92 .../node_modules/unrs-resolver postinstall: [napi-postinstall@0.2.2] Failed to download "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.2.tgz" ENOENT: no such file or directory, open '/app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/unrs-resolver/resolver.linux-x64-musl.node'
33.92 .../node_modules/unrs-resolver postinstall: /app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/napi-postinstall/lib/index.js:227
33.92 .../node_modules/unrs-resolver postinstall: throw new Error((0, helpers_js_1.errorMessage)(`Failed to install package "${pkg}"`, (0, helpers_js_1.getErrorMessage)(err)));
33.92 .../node_modules/unrs-resolver postinstall: ^
33.92 .../node_modules/unrs-resolver postinstall: Error: [napi-postinstall@0.2.2] Failed to install package "@unrs/resolver-binding-linux-x64-musl": ENOENT: no such file or directory, open '/app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/unrs-resolver/resolver.linux-x64-musl.node'
33.92 .../node_modules/unrs-resolver postinstall: at checkAndPreparePackage (/app/node_modules/.pnpm/napi-postinstall@0.2.2/node_modules/napi-postinstall/lib/index.js:227:27)
33.92 .../node_modules/unrs-resolver postinstall: at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
33.92 .../node_modules/unrs-resolver postinstall: Node.js v23.11.0
33.92 .../node_modules/unrs-resolver postinstall: Failed
33.99 ELIFECYCLE Command failed with exit code 1.
This was not an issue in previous versions of this library. I tried to explicitly install the package and add it to my package.json, but it produced the same error. --no-optional is not provided to the install script.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels