-1

I've been having a bunch of problems trying to npm install inside of this directory that a gridsome server was made in. I need to run a successful npm install, but over the past two days I've just been having error after error. I'm desperate for a solution, so any help would be greatly appreciated.

My msvs version is 2019, python is 2.7 node --version: 14.17.0 npm -v 6.14.13 node-gyp -v 8.1.0

Here's the ouput for npm install:

C:\Users\clash\Desktop\webtest\XL-aero>npm install

> sharp@0.23.4 install C:\Users\clash\Desktop\webtest\XL-aero\node_modules\sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node 
install/dll-copy)

info sharp Using cached C:\Users\clash\AppData\Roaming\npm-cache\_libvips\libvips-8.8.1-win32- 
x64.tar.gz
info sharp Creating C:\Users\clash\Desktop\webtest\XL-aero\node_modules\sharp\build\Release
info sharp Copying DLLs from C:\Users\clash\Desktop\webtest\XL-aero\node_modules\sharp\vendor\lib to 
C:\Users\clash\Desktop\webtest\XL-aero\node_modules\sharp\build\Release
prebuild-install WARN install No prebuilt binaries found (target=14.17.0 runtime=node arch=x64 libc= 
platform=win32)

C:\Users\clash\Desktop\webtest\XL-aero\node_modules\sharp>if not defined npm_config_node_gyp (node         
"C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp- 
bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program 
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\bin\node-gyp.js" 
rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:467:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:82:21)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program 
Files\\nodejs\\node_modules\\npm\\node_modules\\npm-lifecycle\\node_modules\\node-gyp\\bin\\node- 
gyp.js" "rebuild"
gyp ERR! cwd C:\Users\clash\Desktop\webtest\XL-aero\node_modules\sharp
gyp ERR! node -v v14.17.0
gyp ERR! node-gyp -v v5.1.1
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package 
author.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (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 ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! sharp@0.23.4 install: `(node install/libvips && node install/dll-copy && prebuild-install) 
|| (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the sharp@0.23.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\clash\AppData\Roaming\npm-cache\_logs\2021-05-31T22_25_47_702Z-debug.log

Any help is greatly appreciated, thanks!

1 Answers1

0

Delete node modules.

Look at the following section of log, Try to update npm and/or node-gyp.

Run.

npm cache clean --force

For details, look at this answer.

tanmoy
  • 1,276
  • 1
  • 10
  • 28