Skip to content
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

Enhancement: provide prebuilt binaries for win32-arm64 #238

Open
5 of 11 tasks
wojtekmaj opened this issue Jun 25, 2024 · 2 comments
Open
5 of 11 tasks

Enhancement: provide prebuilt binaries for win32-arm64 #238

wojtekmaj opened this issue Jun 25, 2024 · 2 comments

Comments

@wojtekmaj
Copy link

Possible install-time or require-time problem

You must confirm both of these before continuing.

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
  • 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 or multi-platform dependencies before opening an issue.

What is the complete error message, including the full stack trace?

node_modules\sharp\lib\sharp.js:114
  throw new Error(help.join('\n'));
        ^

Error: Could not load the "sharp" module using the win32-arm64 runtime
Possible solutions:
- Manually install libvips >= 8.15.2
- Add experimental WebAssembly-based dependencies:
    npm install --cpu=wasm32 sharp
    npm install @img/sharp-wasm32
- Consult the installation documentation:
    See https://sharp.pixelplumbing.com/install
    at Object.<anonymous> (node_modules\sharp\lib\sharp.js:114:9)
    at Module._compile (node:internal/modules/cjs/loader:1460:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1544:10)
    at Module.load (node:internal/modules/cjs/loader:1275:32)
    at Module._load (node:internal/modules/cjs/loader:1091:12)
    at wrapModuleLoad (node:internal/modules/cjs/loader:212:19)
    at Module.require (node:internal/modules/cjs/loader:1297:12)
    at require (node:internal/modules/helpers:123:16)
    at Object.<anonymous> (node_modules\sharp\lib\constructor.js:10:1) 
    at Module._compile (node:internal/modules/cjs/loader:1460:14)

What is the complete output of running npm install --verbose --foreground-scripts sharp in an empty directory?

npm verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verbose title npm install sharp
npm verbose argv "install" "--loglevel" "verbose" "--foreground-scripts" "sharp"
npm verbose logfile logs-max:10 dir:C:\Users\wojte\AppData\Local\npm-cache_logs\2024-06-25T13_33_42_309Z-
npm verbose logfile C:\Users\wojte\AppData\Local\npm-cache_logs\2024-06-25T13_33_42_309Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/sharp 338ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color 126ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver 233ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-arm 270ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linuxmusl-arm64 157ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/detect-libc 296ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-darwin-x64 300ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-darwin-arm64 326ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-arm 139ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-s390x 142ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-x64 141ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-arm64 183ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linuxmusl-arm64 147ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linuxmusl-x64 152ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-win32-ia32 130ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-wasm32 138ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-win32-x64 124ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-darwin-x64 736ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-s390x 740ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-x64 768ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-arm64 779ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-darwin-arm64 790ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linuxmusl-x64 610ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-convert 101ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@emnapi%2fruntime 144ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-string 599ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tslib 85ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/simple-swizzle 87ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-name 97ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-name 576ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-arrayish 106ms (cache miss)
npm verbose reify failed optional dependency node_modules@img\sharp-win32-x64
npm verbose reify failed optional dependency node_modules@img\sharp-win32-ia32
npm verbose reify failed optional dependency node_modules@img\sharp-wasm32
npm verbose reify failed optional dependency node_modules@emnapi\runtime
npm verbose reify failed optional dependency node_modules\tslib
npm verbose reify failed optional dependency node_modules@img\sharp-linuxmusl-x64
npm verbose reify failed optional dependency node_modules@img\sharp-linuxmusl-arm64
npm verbose reify failed optional dependency node_modules@img\sharp-linux-x64
npm verbose reify failed optional dependency node_modules@img\sharp-linux-s390x
npm verbose reify failed optional dependency node_modules@img\sharp-linux-arm64
npm verbose reify failed optional dependency node_modules@img\sharp-linux-arm
npm verbose reify failed optional dependency node_modules@img\sharp-libvips-linuxmusl-x64
npm verbose reify failed optional dependency node_modules@img\sharp-libvips-linuxmusl-arm64
npm verbose reify failed optional dependency node_modules@img\sharp-libvips-linux-x64
npm verbose reify failed optional dependency node_modules@img\sharp-libvips-linux-s390x
npm verbose reify failed optional dependency node_modules@img\sharp-libvips-linux-arm64
npm verbose reify failed optional dependency node_modules@img\sharp-libvips-linux-arm
npm verbose reify failed optional dependency node_modules@img\sharp-libvips-darwin-x64
npm verbose reify failed optional dependency node_modules@img\sharp-libvips-darwin-arm64
npm verbose reify failed optional dependency node_modules@img\sharp-darwin-x64
npm verbose reify failed optional dependency node_modules@img\sharp-darwin-arm64
npm http fetch GET 200 https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz 70ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz 74ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color/-/color-4.2.3.tgz 73ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz 91ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz 102ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz 104ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/sharp/-/sharp-0.33.4.tgz 124ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.2.0.tgz 149ms (cache miss)
npm info run [email protected] install node_modules/sharp node install/check

[email protected] install
node install/check

npm info run [email protected] install { code: 0, signal: null }

added 9 packages in 3s

1 package is looking for funding
run npm fund for details
npm verbose cwd C:\Users\wojte\Projekty\Rewardo\foo
npm verbose os Windows_NT 10.0.26100
npm verbose node v22.3.0
npm verbose npm v10.8.1
npm verbose exit 0
npm info ok

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

npm error code ENOENT
npm error syscall lstat
npm error path C:\Users\wojte\AppData\Roaming\npm
npm error errno -4058
npm error enoent ENOENT: no such file or directory, lstat 'C:\Users\wojte\AppData\Roaming\npm'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: C:\Users\wojte\AppData\Local\npm-cache_logs\2024-06-25T13_34_49_248Z-debug-0.log

@wojtekmaj
Copy link
Author

wojtekmaj commented Jun 25, 2024

With the release of Snapdragon X powered laptops, supporting Windows ARM 64 architecture has become more relevant than ever. This would allow for better development experience for users on these ARM-based machines.

@lovell lovell transferred this issue from lovell/sharp Jun 25, 2024
@lovell lovell changed the title "Error: Could not load the "sharp" module using the win32-arm64 runtime" Enhancement: provide prebuilt binaries for win32-arm64 Jun 25, 2024
@lovell
Copy link
Owner

lovell commented Jun 25, 2024

I've moved this issue to the sharp-libvips repo and tagged as a future possible enhancement as the work for this will start here.

There used to be partial support before lovell/sharp#3750 - demand for Windows ARM was very, very low at the time (around 1 download per day).

This will probably be dependent on https://github.blog/2024-06-03-arm64-on-github-actions-powering-faster-more-efficient-build-systems/

"We expect to begin offering Arm runners for open source projects by the end of the year."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants