node-gyp rebuild error
- Node Version: v8.10.0, npm: 5.6.0
- Platform: CentOS 7
- Compiler: gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
- Module: canvas
Verbose output (from npm or node-gyp):
gyp: binding.gyp not found (cwd: /) while trying to load binding.gyp
Sounds like you're running node-gyp from the root directory (/).
Can you give us a command to run so we can reproduce?
If you just ran npm install and it failed, it's more likely to be a canvas issue FWIW.
Hello , Its been late . But I am also getting same issue while executing command "node-gyp rebuild"
Here is the output :
C:\Users\Simplyfi>node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Users\Simplyfi\.windows-build-tools\python27\python.exe
gyp info spawn args [ 'C:\\Users\\Simplyfi\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Simplyfi\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Simplyfi\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Simplyfi\\.node-gyp\\8.10.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\Simplyfi\\.node-gyp\\8.10.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\Simplyfi\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\Simplyfi\\.node-gyp\\8.10.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Simplyfi',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\Simplyfi\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: C:\Users\Simplyfi) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Simplyfi\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Simplyfi\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Simplyfi
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
@ADitya024 what are you trying to do? It looks like you're running node-gyp rebuild in your home directory, and you're getting an error because your home directory isn't a native node module.
Hello, I am a newbie to use node-gyp. I am receiving the following error while I am trying to install opencv libraries in nodejs on windows. I also tried using node-gyp configure and node-gyp rebuild still it did not work out. Sorry that I am late.
Here is my error:
C:\headshot-maker-master>node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_modules\node-gyp\gyp
\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\headshot-maker-master\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_modules\node-gyp\add
on.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\sravanthi.kanchi\.node-gyp\8.9.4\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\sravanthi.kanchi\.node-gyp\8.9.4',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_modules
\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\Users\sravanthi.kanchi\.node-gyp\8.9.4\<(target_arch)\
node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\headshot-maker-master',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\headshot-maker-master\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: C:\headshot-maker-master) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_module
s\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\sravanthi.kanchi\AppData\Roaming
\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\headshot-maker-master
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
@shravik have you installed the prerequisites from the README: https://github.com/nodejs/node-gyp#on-windows ?
@gibfahn Thank you, Yes, I did install the prerequisites from the README of the above link, but now I am getting a different error related to node-gyp
C:\headshot-maker-master>node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_modules\node-gyp\gyp
\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\headshot-maker-master\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_modules\node-gyp\add
on.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\sravanthi.kanchi\.node-gyp\8.9.4\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\sravanthi.kanchi\.node-gyp\8.9.4',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_modules
\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\Users\sravanthi.kanchi\.node-gyp\8.9.4\<(target_arch)\
node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\headshot-maker-master',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\Arkadium\headshot-maker-master\build',
gyp info spawn args '-Goutput_dir=.' ]
Traceback (most recent call last):
File "C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16,
in gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\sravanthi.kanchi\AppData\Roaming\npm\node_module
s\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\sravanthi.kanchi\AppData\Roaming
\npm\node_modules\node-gyp\bin\node-gyp.js" "configure"
gyp ERR! cwd C:\headshot-maker-master
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
cc/ @nodejs/platform-windows
@gibfahn Sorry for late reply. I checked the link you sent. It does not exist. Can you send me another link ?
Link works for me:

@gibfahn Thanks a lot 😄
ping -- is this still an issue?
@maclover7 no issues now
👍 will close this out then