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

Sharp not being installed { code: 0, signal: null } #3965

Closed
5 tasks done
Jahrhause opened this issue Jan 23, 2024 · 10 comments
Closed
5 tasks done

Sharp not being installed { code: 0, signal: null } #3965

Jahrhause opened this issue Jan 23, 2024 · 10 comments

Comments

@Jahrhause
Copy link

Possible install-time or require-time problem

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.

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

Are you using a supported package manager and installing optional dependencies?

  • I am using npm >= 9.6.5 with --include=optional

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?

After upgrading to sharp 0.33.2 it is not being installed anymore when using NPM using Docker

The only error I'm getting is:

npm info run sharp@0.33.2 install node_modules/sharp node install/check
npm info run sharp@0.33.2 install { code: 0, signal: null }

Everything worked fine in 0.32.6

@lovell
Copy link
Owner

lovell commented Jan 23, 2024

Please can you provide answers to the following questions from the issue template that were ignored/deleted:

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

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

@Jahrhause
Copy link
Author

Hi @lovell

Sorry here they are:

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

#8 [deps 3/5] RUN npm install --verbose --foreground-scripts sharp
#8 0.404 npm verb cli /usr/bin/node /usr/bin/npm
#8 0.404 npm info using npm@10.1.0
#8 0.404 npm info using node@v20.9.0
#8 0.405 npm verb title npm install sharp
#8 0.405 npm verb argv "install" "--loglevel" "verbose" "--foreground-scripts" "sharp"
#8 0.405 npm verb logfile logs-max:10 dir:/opt/app-root/src/.npm/_logs/2024-01-24T07_04_29_010Z-
#8 0.412 npm verb logfile /opt/app-root/src/.npm/_logs/2024-01-24T07_04_29_010Z-debug-0.log
#8 0.817 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/sharp 232ms (cache miss)
#8 1.009 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color 181ms (cache miss)
#8 1.033 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/npm 477ms (cache miss)
#8 1.368 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-darwin-arm64 538ms (cache miss)
#8 1.369 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-wasm32 534ms (cache miss)
#8 1.404 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-libvips-linuxmusl-x64 570ms (cache miss)
#8 1.405 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-libvips-linux-arm64 574ms (cache miss)
#8 1.422 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/detect-libc 593ms (cache miss)
#8 1.441 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-libvips-linuxmusl-arm64 608ms (cache miss)
#8 1.442 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-win32-ia32 605ms (cache miss)
#8 1.442 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-linuxmusl-x64 607ms (cache miss)
#8 1.445 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/semver 616ms (cache miss)
#8 2.242 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-linuxmusl-arm64 1400ms (cache miss)
#8 2.285 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-win32-x64 1448ms (cache miss)
#8 2.637 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-libvips-darwin-arm64 1806ms (cache miss)
#8 2.775 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-linux-arm 1942ms (cache miss)
#8 2.776 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-linux-arm64 1942ms (cache miss)
#8 2.848 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-libvips-linux-s390x 2016ms (cache miss)
#8 2.888 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-linux-x64 2054ms (cache miss)
#8 2.900 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-linux-s390x 2066ms (cache miss)
#8 2.921 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-darwin-x64 2091ms (cache miss)
#8 2.927 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-libvips-linux-arm 2095ms (cache miss)
#8 2.975 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-libvips-linux-x64 2143ms (cache miss)
#8 3.245 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img%2fsharp-libvips-darwin-x64 2414ms (cache miss)
#8 3.417 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color-convert 136ms (cache miss)
#8 3.418 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color-string 137ms (cache miss)
#8 3.424 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@emnapi%2fruntime 147ms (cache miss)
#8 3.525 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/lru-cache 241ms (cache miss)
#8 3.667 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/tslib 129ms (cache miss)
#8 3.770 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/simple-swizzle 96ms (cache miss)
#8 3.773 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color-name 101ms (cache miss)
#8 3.775 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color-name 101ms (cache miss)
#8 3.877 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/is-arrayish 98ms (cache miss)
#8 3.982 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/yallist 100ms (cache miss)
#8 4.000 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-win32-x64
#8 4.002 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-win32-ia32
#8 4.003 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-wasm32
#8 4.004 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@emnapi/runtime
#8 4.008 npm verb reify failed optional dependency /opt/app-root/src/node_modules/tslib
#8 4.009 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-linuxmusl-arm64
#8 4.010 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-linux-s390x
#8 4.011 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-linux-arm64
#8 4.012 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-linux-arm
#8 4.013 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-libvips-linuxmusl-arm64
#8 4.014 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-libvips-linux-s390x
#8 4.015 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-libvips-linux-arm64
#8 4.016 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-libvips-linux-arm
#8 4.016 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-libvips-darwin-x64
#8 4.017 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-libvips-darwin-arm64
#8 4.018 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-darwin-x64
#8 4.019 npm verb reify failed optional dependency /opt/app-root/src/node_modules/@img/sharp-darwin-arm64
#8 4.194 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color-convert/-/color-convert-2.0.1.tgz 159ms (cache miss)
#8 4.195 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color-name/-/color-name-1.1.4.tgz 165ms (cache miss)
#8 4.199 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color-string/-/color-string-1.9.1.tgz 167ms (cache miss)
#8 4.200 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/lru-cache/-/lru-cache-6.0.0.tgz 172ms (cache miss)
#8 4.201 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/simple-swizzle/-/simple-swizzle-0.2.2.tgz 172ms (cache miss)
#8 4.202 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/yallist/-/yallist-4.0.0.tgz 175ms (cache miss)
#8 4.204 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/detect-libc/-/detect-libc-2.0.2.tgz 160ms (cache miss)
#8 4.205 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/color/-/color-4.2.3.tgz 160ms (cache miss)
#8 4.212 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/is-arrayish/-/is-arrayish-0.3.2.tgz 185ms (cache miss)
#8 4.220 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/tslib/-/tslib-2.6.2.tgz 187ms (cache miss)
#8 4.226 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.2.tgz 181ms (cache miss)
#8 4.229 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.2.tgz 184ms (cache miss)
#8 4.236 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@emnapi/runtime/-/runtime-0.45.0.tgz 203ms (cache miss)
#8 4.261 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/sharp/-/sharp-0.33.2.tgz 213ms (cache miss)
#8 4.429 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/semver/-/semver-7.5.4.tgz 389ms (cache miss)
#8 4.741 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.1.tgz 694ms (cache miss)
#8 4.744 npm http fetch GET 200 ***artifactory/api/npm/npmjs-org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.1.tgz 698ms (cache miss)
#8 4.749 npm info run sharp@0.33.2 install node_modules/sharp node install/check
#8 4.751 
#8 4.751 > sharp@0.33.2 install
#8 4.751 > node install/check
#8 4.751 
#8 4.837 npm info run sharp@0.33.2 install { code: 0, signal: null }
#8 4.859 
#8 4.859 added 15 packages in 5s

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

#10 [deps 5/5] RUN npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
#10 1.244 
#10 1.244   System:
#10 1.244     OS: Linux 5.15 Red Hat Enterprise Linux 9.3 (Plow)
#10 1.244     CPU: (2) x64 Intel(R) Xeon(R) Gold 6256 CPU @ 3.60GHz
#10 1.244     Memory: 2.65 GB / 3.82 GB
#10 1.244     Container: Yes
#10 1.244     Shell: 5.1.8 - /bin/bash
#10 1.244   Binaries:
#10 1.244     Node: 20.9.0 - /usr/bin/node
#10 1.244     npm: 10.1.0 - /usr/bin/npm
#10 1.244   npmPackages:
#10 1.244     sharp: ^0.33.2 => 0.33.2 
#10 1.244 
#10 DONE 1.3s

@lovell
Copy link
Owner

lovell commented Jan 24, 2024

Thanks for the extra information, not quite sure what's happening here. The { code: 0, signal: null } message looks like something from an old version of Node.js. Could there be multiple, conflicting versions of Node.js on this machine?

@lovell
Copy link
Owner

lovell commented Jan 24, 2024

Looking at this again, it appears to have installed correctly. I think the { code: 0, signal: null } message is just extra information output by the latest Node.js / npm and is nothing to worry about.

@Jahrhause
Copy link
Author

When I look in the sharp folder, it doesnt contain a build folder as 0.32.6 did.

This is the content:

  • LICENSE
  • README.md
  • install (folder)
  • lib (folder)
  • package.json
  • src (folder)

@Jahrhause
Copy link
Author

Nvm I found at that the build resides in the @img now... Copying that over and everything works again :)

@lovell
Copy link
Owner

lovell commented Jan 24, 2024

Please see #3750 for context.

Copying that over...

You shouldn't need to copy anything to make it work, your package manager will install everything in the right place, unless perhaps you have some kind of extra manual build process that is selectively copying packages?

@Jahrhause
Copy link
Author

Forgot to mention that im using Next.js :(

Found this issue #3877 explaining the need to add it to outputFileTracingIncludes to make it work.

My mistake for not finding the already answered issue, my apologies :)

@lovell
Copy link
Owner

lovell commented Jan 24, 2024

The latest Next.js 14.1.0 contains a couple of recent bug fixes relating to standalone builds that should allow you to remove any custom copying logic.

@Jahrhause
Copy link
Author

Thanks for the heads up @lovell I will look into that. And again thanks for your much needed support :)

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