sharp: WSL: Node.js 18 installed from Snap Store, Could not load the "sharp" module using the linux-x64 runtime

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?

  • I am using the latest version of sharp as reported by npm 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?

  • I am using Node.js with a version that satisfies ^18.17.0 || ^20.3.0 || >=21.0.0
  • I am using Deno
  • I am using Bun

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?

  • I am using npm >= 9.6.5 with --include=optional
  • I am using yarn >= 3.2.0 and I am not using the “Plug’n’Play” linker
  • I am using pnpm >= 7.1.0 with --no-optional=false
  • I am using Deno
  • I am using Bun

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 npm@9.8.1 npm info using node@v18.18.0 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 sharp@0.33.0 install node_modules/sharp node install/check

sharp@0.33.0 install node install/check

npm info run sharp@0.33.0 install { code: 0, signal: null }

added 15 packages in 4s

5 packages are looking for funding run npm fund for details npm verb exit 0 npm info ok

What is the output of running npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp?

System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
    Memory: 21.94 GB / 30.91 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.18.0 - /snap/bin/node
    Yarn: 1.22.19 - /snap/bin/yarn
    npm: 9.8.1 - /snap/bin/npm
    pnpm: 8.7.0 - /mnt/c/Users/eric/AppData/Roaming/npm/pnpm
  npmPackages:
    sharp: ^0.33.0 => 0.33.0 

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Reactions: 2
  • Comments: 15 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@lovell Totally agree its not a good long term solution. Just needed a quick way to get back up and running. Anyway, not a problem, happy for you to triage my comment in the way you think is best appropriate. And love your package, I’ve used it many times over the years, thank you 😃