lovell / sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
https://sharp.pixelplumbing.com
Apache License 2.0
29.28k stars 1.3k forks source link

The specified procedure could not be found .\node_modules\sharp\build\Release\sharp.node #2899

Closed BrandonPaulEWL closed 3 years ago

BrandonPaulEWL commented 3 years ago

I wasn't seeing this error until after I tried to migrate from gatsby-image to gatsby-plugin-image and I ran the command npx gatsby-codemods gatsby-plugin-image.

I am getting the following output upon trying to run gatsby develop:

`info We're shipping new features! For final testing, we're rolling them out first to a small % of Gatsby users and your site was automatically chosen as one of them. With your help, we'll then release them to everyone in the next minor release.

We greatly appreciate your help testing the change. Please report any feedback good or bad in the umbrella issue. If you do encounter problems, please disable the flag by setting it to false in your gatsby-config.js like:

flags: { THE_FLAG: false }

The following flags were automatically enabled on your site:

success open and validate gatsby-configs - 0.147s

ERROR

Error in "C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules\gatsby-plugin-manifest\gatsby-node.js": Something went wrong installing the "sharp" module

The specified procedure could not be found. \?\C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules\gatsby-plugin-manifest\node_modules\sharp\build\Release\sharp.node

not finished load plugins - 1.656s`

Did you see the documentation relating to installation?

Yes

Have you ensured 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?

I think so

Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest?

I get the following for npm ls sharp

+-- gatsby-plugin-manifest@3.3.0 |-- sharp@0.28.3 +-- gatsby-plugin-sharp@3.14.0 | -- sharp@0.29.1 deduped +-- gatsby-transformer-sharp@3.14.0 |-- sharp@0.29.1 -- sharp@0.29.1

I get the following for npm view sharp dist-tags.latest

0.29.1

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?

yes

If you are using npm v7, 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?

I tried this.

What is the complete output of running npm install --verbose sharp? Have you checked this output for useful error messages?

`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 'sharp' npm verb cli ] npm info using npm@6.14.13 npm info using node@v14.17.3 npm verb npm-session a5f150feda9ca9ad npm http fetch GET 200 https://registry.npmjs.org/sharp 166ms npm timing stage:loadCurrentTree Completed in 2538ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 26ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1505ms npm http fetch GET 304 https://registry.npmjs.org/node-addon-api 46ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color 74ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/semver 79ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-string 39ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-convert 45ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-name 31ms (from cache) npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 4395ms npm timing stage:loadIdealTree Completed in 6547ms npm timing stage:generateActionsToTake Completed in 166ms npm verb correctMkdir C:\Users\Brandon.paul\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\Brandon.paul\AppData\Roaming\npm-cache_locks\staging-44dc58deb8c59928.lock for C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules.staging npm timing action:extract Completed in 85ms npm info lifecycle sharp@0.29.1~preuninstall: sharp@0.29.1 npm info lifecycle sharp@0.29.1~uninstall: sharp@0.29.1 npm verb unbuild rmStuff sharp@0.29.1 from C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules npm info lifecycle sharp@0.29.1~postuninstall: sharp@0.29.1 npm timing action:unbuild Completed in 5ms npm timing audit submit Completed in 233ms npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 234ms npm timing audit body Completed in 2ms npm timing action:remove Completed in 142ms npm timing action:finalize Completed in 14ms npm timing action:refresh-package-json Completed in 18ms npm info lifecycle sharp@0.29.1~preinstall: sharp@0.29.1 npm timing action:preinstall Completed in 1ms npm info linkStuff sharp@0.29.1 npm timing action:build Completed in 1ms npm info lifecycle sharp@0.29.1~install: sharp@0.29.1

sharp@0.29.1 install C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\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\Brandon.paul\AppData\Roaming\npm-cache_libvips\libvips-8.11.3-win32-x64.tar.br sharp: Creating C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules\sharp\build\Release sharp: Copying DLLs from C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules\sharp\vendor\8.11.3\win32-x64\lib to C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules\sharp\build\Release prebuild-install info begin Prebuild-install version 6.1.4 prebuild-install info looking for local prebuild @ prebuilds\sharp-v0.29.1-napi-v5-win32-x64.tar.gz prebuild-install info looking for cached prebuild @ C:\Users\Brandon.paul\AppData\Roaming\npm-cache_prebuilds\710ed0-sharp-v0.29.1-napi-v5-win32-x64.tar.gz prebuild-install info found cached prebuild prebuild-install info unpacking @ C:\Users\Brandon.paul\AppData\Roaming\npm-cache_prebuilds\710ed0-sharp-v0.29.1-napi-v5-win32-x64.tar.gz prebuild-install info unpack resolved to C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules\sharp\build\Release\sharp-win32-x64.node prebuild-install info install Successfully installed prebuilt binary! npm verb lifecycle sharp@0.29.1~install: unsafe-perm in lifecycle true npm verb lifecycle sharp@0.29.1~install: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules\sharp\node_modules.bin;C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Mitel\Connect\;C:\Program Files\nodejs\;C:\Users\Brandon.paul\AppData\Local\Microsoft\WindowsApps;C:\Users\Brandon.paul\AppData\Local\atom\bin;C:\Users\Brandon.paul\AppData\Roaming\npm;C:\Users\Brandon.paul\AppData\Local\Programs\Git\cmd;C:\Program Files (x86)\GitHub CLI\;C:\Users\Brandon.paul\AppData\Local\Programs\Microsoft VS Code\bin npm verb lifecycle sharp@0.29.1~install: CWD: C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules\sharp npm timing action:install Completed in 1941ms npm info lifecycle sharp@0.29.1~postinstall: sharp@0.29.1 npm timing action:postinstall Completed in 0ms npm verb unlock done using C:\Users\Brandon.paul\AppData\Roaming\npm-cache_locks\staging-44dc58deb8c59928.lock for C:\Users\Brandon.paul\Documents\EWL\wp-gatsby-learning-library\node_modules.staging npm timing stage:executeActions Completed in 2225ms npm timing stage:rollbackFailedOptional Completed in 18ms npm timing stage:runTopLevelLifecycles Completed in 11999ms npm verb saving [ { name: 'sharp', spec: '^0.29.1', save: 'dependencies' } ] npm verb shrinkwrap skipping write for package.json because there were no changes. npm info lifecycle undefined~preshrinkwrap: undefined npm info lifecycle gatsby-starter-wordpress-blog@1.0.0~shrinkwrap: gatsby-starter-wordpress-blog@1.0.0 npm verb shrinkwrap skipping write for package-lock.json because there were no changes. npm info lifecycle gatsby-starter-wordpress-blog@1.0.0~postshrinkwrap: gatsby-starter-wordpress-blog@1.0.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 react-side-effect@1.2.0 requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.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@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 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

240 packages are looking for funding run npm fund for details

found 581 vulnerabilities (96 moderate, 484 high, 1 critical) run npm audit fix to fix them, or npm audit for details npm verb exit [ 0, true ] npm timing npm Completed in 14432ms npm info ok`

What is the output of running npx envinfo --binaries --system?

System: OS: Windows 10 10.0.18363 CPU: (8) x64 Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz Memory: 5.08 GB / 15.79 GB Binaries: Node: 14.17.3 - C:\Program Files\nodejs\node.EXE npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD

lovell commented 3 years ago

+-- gatsby-plugin-manifest@3.3.0 | -- sharp@0.28.3

Please upgrade gatsby-plugin-manifest to the latest version.

BrandonPaulEWL commented 3 years ago

That got my develop server running again. Thank you.