-
Notifications
You must be signed in to change notification settings - Fork 80
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: Undefined variable module_name in binding.gyp while trying to load binding.gyp #86
Comments
full log on -verbose npm info run [email protected] install node_modules/lightning-charge/node_modules/sqlite3 node-gyp rebuild |
I suggest following these instructions to install global packages as a non-root user, so that you don't need to install with (also mentioned in the readme) Let me know if you're still having trouble. |
Hi @shesek, trying to install lightning-charge fails for me as well with the "gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp" error (but no explicit permission denied errors). I am on Ubuntu 20.04, npm 8.5.0 and node 12.22.10 and first tried it as root, then according to your hint with nvm, then as a new user "lightningcharge" with the changed default directory according to your link. But still getting the "Undefined variable module_name in binding.gyp while trying to load binding.gyp" error.
|
Same here. |
failed to install
sudo npm install -g lightning-charge --unsafe-perm
npm ERR! code 1
npm ERR! path /usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/node_modules/lightning-charge/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -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] | linux | arm64
npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! gyp WARN EACCES current user ("pi") does not have permission to access the dev dir "/root/.cache/node-gyp/14.17.6"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/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 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/node_modules/lightning-charge/node_modules/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/tmp/.node-gyp/14.17.6/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=/tmp/.node-gyp/14.17.6',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/tmp/.node-gyp/14.17.6/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/node_modules/lightning-charge/node_modules/sqlite3',
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 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error:
gyp
failed with exit code: 1npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Linux 5.10.63-v8+
npm ERR! gyp ERR! command "/usr/local/lib/nodejs/node-v14.17.6-linux-arm64/bin/node" "/usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/lib/nodejs/node-v14.17.6-linux-arm64/lib/node_modules/lightning-charge/node_modules/sqlite3
npm ERR! gyp ERR! node -v v14.17.6
npm ERR! gyp ERR! node-gyp -v v8.4.0
npm ERR! gyp ERR! not ok
The text was updated successfully, but these errors were encountered: