Skip to content

Something went wrong installing the "sharp" module #3360

@zackthe

Description

@zackthe

Possible install-time or require-time problem

  • I have read the documentation relating to installation.
  • I have ensured that the architecture and platform of Node.js used for npm install is the same as the architecture and platform of Node.js used at runtime.

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.

Is this a problem with filesystem permissions?

If you are using npm v6 or earlier and installing as a root or sudo user, have you tried with the npm install --unsafe-perm flag?

If you are using npm v7 or later, does the user running npm install own the directory it is run in?

If you are using the ignore-scripts feature of npm, have you tried with the npm install --ignore-scripts=false flag?

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

Details

PS C:\Users\zack\Desktop\Myportfolio-gatsby> npm install --verbose --foreground-scripts sharp
npm info it worked if it ends with ok
npm verb cli [
npm verb cli 'C:\Program Files\nodejs\node.exe',
npm verb cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
npm verb cli 'install',
npm verb cli '--verbose',
npm verb cli '--foreground-scripts',
npm verb cli 'sharp'
npm verb cli ]
npm info using npm@6.14.11
npm info using node@v14.16.0
npm verb npm-session 6ff38c6735fd0fb9
npm http fetch GET 304 https://registry.npmjs.org/sharp 618ms (from cache)
npm timing stage:loadCurrentTree Completed in 11767ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 167ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 6275ms
npm http fetch GET 304 https://registry.npmjs.org/node-addon-api 749ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/semver 789ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/simple-get 823ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/detect-libc 927ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/color 1259ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/prebuild-install 1477ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/color-convert 152ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/color-string 333ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/color-name 128ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/node-abi 131ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/decompress-response 219ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/mimic-response 154ms (from cache)
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 50575ms
npm timing stage:loadIdealTree Completed in 62086ms
npm timing stage:generateActionsToTake Completed in 1050ms
npm verb correctMkdir C:\Users\zack\AppData\Roaming\npm-cache_locks correctMkdir not in flight; initializing
npm verb makeCacheDir UID & GID are irrelevant on win32
npm verb lock using C:\Users\zack\AppData\Roaming\npm-cache_locks\staging-59b98375e7e1f52e.lock for C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules.staging
npm timing action:extract Completed in 1186ms
npm info lifecycle sharp@0.31.0preuninstall: sharp@0.31.0
npm info lifecycle sharp@0.31.0
uninstall: sharp@0.31.0
npm verb unbuild rmStuff sharp@0.31.0 from C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules
npm info lifecycle sharp@0.31.0postuninstall: sharp@0.31.0
npm timing action:unbuild Completed in 20ms
npm timing action:remove Completed in 1353ms
npm timing audit submit Completed in 2887ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 2981ms
npm timing audit body Completed in 130ms
npm timing action:finalize Completed in 538ms
npm timing action:refresh-package-json Completed in 874ms
npm info lifecycle sharp@0.31.0
preinstall: sharp@0.31.0
npm timing action:preinstall Completed in 19ms
npm info linkStuff sharp@0.31.0
npm timing action:build Completed in 132ms
npm info lifecycle sharp@0.31.0~install: sharp@0.31.0

sharp@0.31.0 install C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules\sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Using cached C:\Users\zack\AppData\Roaming\npm-cache_libvips\libvips-8.13.1-win32-x64.tar.br
sharp: Integrity check passed for win32-x64
sharp: Creating C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules\sharp\build\Release
sharp: Copying DLLs from C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules\sharp\vendor\8.13.1\win32-x64\lib to C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules\sharp\build\Release
prebuild-install info begin Prebuild-install version 7.1.1
prebuild-install info looking for local prebuild @ prebuilds\sharp-v0.31.0-napi-v7-win32-x64.tar.gz
prebuild-install info looking for cached prebuild @ C:\Users\zack\AppData\Roaming\npm-cache_prebuilds\4f75b1-sharp-v0.31.0-napi-v7-win32-x64.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ C:\Users\zack\AppData\Roaming\npm-cache_prebuilds\4f75b1-sharp-v0.31.0-napi-v7-win32-x64.tar.gz
prebuild-install info unpack resolved to C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules\sharp\build\Release\sharp-win32-x64.node
prebuild-install info install Successfully installed prebuilt binary!
npm verb lifecycle sharp@0.31.0install: unsafe-perm in lifecycle true
npm verb lifecycle sharp@0.31.0
install: PATH: C:\Users\zack\AppData\Roaming\nvm\v12.20.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules\sharp\node_modules.bin;C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\dotnet;C:\Users\zack\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Ruby27-x64\bin;C:\Users\zack\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\zack.dotnet\tools;C:\Users\zack\AppData\Roaming\nvm;C:\Program Files\nodejs
npm verb lifecycle sharp@0.31.0install: CWD: C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules\sharp
npm timing action:install Completed in 35576ms
npm info lifecycle sharp@0.31.0
postinstall: sharp@0.31.0
npm timing action:postinstall Completed in 2ms
npm verb unlock done using C:\Users\zack\AppData\Roaming\npm-cache_locks\staging-59b98375e7e1f52e.lock for C:\Users\zack\Desktop\Myportfolio-gatsby\node_modules.staging
npm timing stage:executeActions Completed in 39890ms
npm timing stage:rollbackFailedOptional Completed in 844ms
npm timing stage:runTopLevelLifecycles Completed in 118377ms
npm verb saving [ { name: 'sharp', spec: '^0.31.0', save: 'dependencies' } ]
npm verb shrinkwrap skipping write for package.json because there were no changes.
npm info lifecycle undefinedpreshrinkwrap: undefined
npm info lifecycle gatsby-starter-hello-world@0.1.0
shrinkwrap: gatsby-starter-hello-world@0.1.0
npm verb shrinkwrap skipping write for package-lock.json because there were no changes.
npm info lifecycle gatsby-starter-hello-world@0.1.0~postshrinkwrap: gatsby-starter-hello-world@0.1.0
npm WARN eslint-config-react-app@6.0.0 requires a peer of babel-eslint@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN express-graphql@0.9.0 requires a peer of graphql@^14.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN gatsby-plugin-disqus@1.2.2 requires a peer of react@^16.8.5 but none is installed. You must install peer dependencies yourself.
npm WARN friendly-errors-webpack-plugin@1.7.0 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN gatsby-react-router-scroll@1.0.18 requires a peer of react-router-dom@^4.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-node@9.1.1 requires a peer of typescript@>=2.7 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\babel-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\gatsby-source-strapi\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64

  • sharp@0.31.0
    updated 1 package and audited 2502 packages in 125.821s

286 packages are looking for funding
run npm fund for details

found 226 vulnerabilities (6 low, 123 moderate, 80 high, 17 critical)
run npm audit fix to fix them, or npm audit for details
npm verb exit [ 0, true ]
npm timing npm Completed in 133995ms
npm info ok

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

PS C:\Users\zack\Desktop\Myportfolio-gatsby> npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp

System:
OS: Windows 7 6.1.7601
CPU: (2) x64 Intel(R) Pentium(R) CPU P6000 @ 1.87GHz
Memory: 622.39 MB / 3.86 GB
Binaries:
Node: 14.16.0 - C:\Program Files\nodejs\node.EXE
npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
npmPackages:
sharp: ^0.31.0 => 0.31.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions