Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. #79

Open
artforlife opened this issue Apr 29, 2022 · 0 comments

Comments

@artforlife
Copy link

artforlife commented Apr 29, 2022

When running node-gyp rebuild step from the following instructions

$ npm install node-gyp -g
$ git clone git:https://github.com/c4milo/node-inotify.git
$ cd node-inotify
$ node-gyp rebuild

I get this error:

(base) ➜  node-inotify git:(master) node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.7.0 found at "/home/user/miniconda3/bin/python3"
gyp info spawn /home/user/miniconda3/bin/python3
gyp info spawn args [
gyp info spawn args   '/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/user/tmp/node-inotify/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/user/.cache/node-gyp/16.14.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/user/.cache/node-gyp/16.14.2',
gyp info spawn args   '-Dnode_gyp_dir=/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/user/.cache/node-gyp/16.14.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/user/tmp/node-inotify',
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   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'nan'
Require stack:
- /home/user/tmp/node-inotify/[eval]
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at [eval]:1:1
    at Script.runInThisContext (node:vm:129:12)
    at Object.runInThisContext (node:vm:305:38)
    at node:internal/process/execution:76:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:75:60) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/user/tmp/node-inotify/[eval]' ]
}
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. 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 (/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/node-gyp/lib/configure.js:261:16)
gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.16.0+
gyp ERR! command "/home/user/.nvm/versions/node/v16.14.2/bin/node" "/home/user/.nvm/versions/node/v16.14.2/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/user/tmp/node-inotify
gyp ERR! node -v v16.14.2
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant