Error Installing parcel showing error at parcel\watcher and at node-gyp rebuild

149 Views Asked by At

1 npm ERR! path C:\Users\USER\OneDrive\Documents\My sites\Music Website\node_modules@parcel\watcher npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | win32 | ia32 npm ERR! gyp info find Python using Python version 3.12.1 found at "C:\Users\USER\AppData\Local\Programs\Python\Python312\python.exe" npm ERR! gyp info find VS using VS2022 (17.8.34525.116) found at: npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Users\USER\AppData\Local\Programs\Python\Python312\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\USER\OneDrive\Documents\My sites\Music Website\node_modules\@parcel\watcher\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\USER\AppData\Local\node-gyp\Cache\20.11.0\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\USER\AppData\Local\node-gyp\Cache\20.11.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\USER\\AppData\\Local\\node-gyp\\Cache\\20.11.0\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\USER\OneDrive\Documents\My sites\Music Website\node_modules\@parcel\watcher', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'C:\Users\USER\OneDrive\Documents\My sites\Music Website\node_modules\@parcel\watcher\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp: binding.gyp not found (cwd: C:\Users\USER\OneDrive\Documents\My sites\Music Website\node_modules@parcel\watcher) while trying to load binding.gyp
npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess. (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:271:18) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:518:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Windows_NT 10.0.22631 npm ERR! gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd C:\Users\USER\OneDrive\Documents\My sites\Music Website\node_modules@parcel\watcher npm ERR! gyp ERR! node -v v20.11.0 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\Users\USER\AppData\Local\npm-cache_logs\2024-02-06T18_23_39_568Z-debug-0.log

Error trying to install parcel

i ran npm i parcel --save-dev but it was giving me errors which appeared to be coming from parcel\watcher and also node-gyp rebuild

1

There are 1 best solutions below

0
Дилик Пулатов On

I also had a problem with the @parcel/watcher throwing an error npm ERR! gyp: binding.gyp not found. I found a workaround by overriding it on package.json

"overrides": {
    "@parcel/watcher": "2.1.0"
},

details here