-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL: Node.js 18 installed from Snap Store, Could not load the "sharp" module using the linux-x64 runtime #3884
Comments
Hi, please can you provide answers to all of the questions in the issue template. |
@lovell Updated |
Thank you, please can you also provide the complete output of running |
|
Thank you, it looks like you're using Node.js installed from the Snap Store. nodejs/snap#54 suggests there are known problems relating to it partially linking to system libraries rather than core libraries, which rather defeats the point of snaps. The output of |
I've been able to reproduce this locally:
Explicitly setting
This relates to classic confinement, where every shared library under control of the snap is assumed to have an The prebuilt libvips binaries provided by sharp do not set
In summary, using any native module with a snap-installed Node.js allows escape from classic confinement, which means you'll always need to ensure the version of |
There are quite a few issues relating to this at https://github.com/nodejs/snap/issues I've added some help text that will be displayed upon failure via commit 9e3b021 |
The same but not snap node:
Installed and build on Centos 7 with Developer Toolset 7 as usual. |
@NormandoHall As of sharp v0.33.0, the prebuilt binaries no longer support Centos 7. |
Commit c5eaeb2 will show help text relating to use of an outdated libc when this error message occurs. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@AlastairTaft Please can you open a new installation issue and answer all of the questions. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@AlastairTaft Pinning a dependency to a previous, unsupported version is unlikely to be the right long-term solution to a problem. For anyone coming here - please open a new installation issue and answer all of the questions if you still require help. (I'm hiding your comments as they introduce the L word to an issue that had previously never used it. This helps prevent search engines indexing this issue as relating to the L word. There are many other issues that do relate to the L word and I'd prefer people saw those first. I hope you understand.) |
@lovell Totally agree its not a good long term solution. Just needed a quick way to get back up and running. Anyway, not a |
Possible install-time or require-time problem
I'm running into the same issue as #3870, but I'm running locally in WSL.
Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest, please open an issue against that package instead.Are you using a supported runtime?
^18.17.0 || ^20.3.0 || >=21.0.0
If you cannot confirm any of these, please upgrade to the latest version and try again before opening an issue.
Are you using a supported package manager and installing optional dependencies?
--include=optional
--no-optional=false
If you cannot confirm any of these, please upgrade to the latest version of your chosen package manager and ensure you are allowing the installation of optional dependencies before opening an issue.
What is the complete output of running
npm install --verbose --foreground-scripts sharp
in an empty directory?$ npm install --verbose --foreground-scripts sharp
npm verb cli /snap/node/7823/bin/node /snap/node/7823/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verb title npm install sharp
npm verb argv "install" "--loglevel" "verbose" "--foreground-scripts" "sharp"
npm verb logfile logs-max:10 dir:/home/eric/.npm/_logs/2023-12-07T20_41_33_116Z-
npm verb logfile /home/eric/.npm/_logs/2023-12-07T20_41_33_116Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/sharp 92ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/detect-libc 33ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver 58ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color 80ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-arm64 199ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-wasm32 375ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linuxmusl-arm64 883ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linuxmusl-x64 893ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-darwin-arm64 900ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-arm 911ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-darwin-x64 930ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-s390x 928ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-win32-x64 950ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-x64 952ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-darwin-arm64 959ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-darwin-x64 959ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-s390x 960ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-x64 971ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linuxmusl-arm64 973ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-arm64 977ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-arm 1282ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linuxmusl-x64 1751ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-win32-ia32 1803ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-string 27ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-convert 36ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lru-cache 45ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@emnapi%2fruntime 919ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tslib 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-name 29ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-name 34ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/simple-swizzle 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-arrayish 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/yallist 32ms (cache miss)
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-win32-x64
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-win32-ia32
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-wasm32
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@emnapi/runtime
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/tslib
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-linuxmusl-arm64
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-linux-s390x
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-linux-arm64
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-linux-arm
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-libvips-linuxmusl-arm64
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-libvips-linux-s390x
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-libvips-linux-arm64
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-libvips-linux-arm
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-libvips-darwin-x64
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-libvips-darwin-arm64
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-darwin-x64
npm verb reify failed optional dependency /home/eric/code/foo/node_modules/@img/sharp-darwin-arm64
npm http fetch GET 200 https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz 34ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color/-/color-4.2.3.tgz 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz 55ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/sharp/-/sharp-0.33.0.tgz 56ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.0.tgz 331ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.0.tgz 455ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.44.0.tgz 456ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.0.tgz 458ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.0.tgz 593ms (cache miss)
npm info run [email protected] install node_modules/sharp node install/check
npm info run [email protected] install { code: 0, signal: null }
added 15 packages in 4s
5 packages are looking for funding
run
npm fund
for detailsnpm verb exit 0
npm info ok
What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?The text was updated successfully, but these errors were encountered: