question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in npm install, please suggest the possible solution.

See original GitHub issue

ref@1.3.5 install /home/username/ros2-web-bridge/node_modules/rclnodejs/node_modules/ref node-gyp rebuild

make: Entering directory ‘/home/username/ros2-web-bridge/node_modules/rclnodejs/node_modules/ref/build’ CXX(target) Release/obj.target/binding/src/binding.o …/src/binding.cc: In function ‘void init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’: …/src/binding.cc:643:8: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::Newv8::String(“endianness”).ToLocalChecked(), Nan::Newv8::String(CheckEndianness()).ToLocalChecked(), static_ ^ In file included from …/node_modules/nan/nan.h:197:0, from …/src/binding.cc:7: …/node_modules/nan/nan_maybe_43_inl.h:116:35: note: declared here NAN_DEPRECATED inline Maybe<bool> ForceSet( ^ …/src/binding.cc:643:8: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::Newv8::String(“endianness”).ToLocalChecked(), Nan::Newv8::String(CheckEndianness()).ToLocalChecked(), static_ ^ In file included from …/node_modules/nan/nan.h:197:0, from …/src/binding.cc:7: …/node_modules/nan/nan_maybe_43_inl.h:116:35: note: declared here NAN_DEPRECATED inline Maybe<bool> ForceSet( ^ …/src/binding.cc:643:187: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations] endianness").ToLocalChecked(), Nan::Newv8::String(CheckEndianness()).ToLocalChecked(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)); ^ In file included from …/node_modules/nan/nan.h:197:0, from …/src/binding.cc:7: …/node_modules/nan/nan_maybe_43_inl.h:116:35: note: declared here NAN_DEPRECATED inline Maybe<bool> ForceSet( ^ …/src/binding.cc:644:8: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::Newv8::String(“NULL”).ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)) ^ In file included from …/node_modules/nan/nan.h:197:0, from …/src/binding.cc:7: …/node_modules/nan/nan_maybe_43_inl.h:116:35: note: declared here NAN_DEPRECATED inline Maybe<bool> ForceSet( ^ …/src/binding.cc:644:8: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::Newv8::String(“NULL”).ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)) ^ In file included from …/node_modules/nan/nan.h:197:0, from …/src/binding.cc:7: …/node_modules/nan/nan_maybe_43_inl.h:116:35: note: declared here NAN_DEPRECATED inline Maybe<bool> ForceSet( ^ …/src/binding.cc:644:142: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::Newv8::String(“NULL”).ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)); ^ In file included from …/node_modules/nan/nan.h:197:0, from …/src/binding.cc:7: …/node_modules/nan/nan_maybe_43_inl.h:116:35: note: declared here NAN_DEPRECATED inline Maybe<bool> ForceSet( ^ SOLINK_MODULE(target) Release/obj.target/binding.node COPY Release/binding.node make: Leaving directory ‘/home/username/ros2-web-bridge/node_modules/rclnodejs/node_modules/ref/build’

rclnodejs@0.3.1 install /home/username/ros2-web-bridge/node_modules/rclnodejs node-gyp rebuild

module.js:327 throw err; ^

Error: Cannot find module ‘nan’ at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at [eval]:1:1 at Object.exports.runInThisContext (vm.js:54:17) at Object.<anonymous> ([eval]-wrapper:6:22) at Module._compile (module.js:409:26) at node.js:579:27 at nextTickCallbackWith0Args (node.js:420:9) 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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 4.13.0-26-generic gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” gyp ERR! cwd /home/username/ros2-web-bridge/node_modules/rclnodejs gyp ERR! node -v v4.4.2 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Linux 4.13.0-26-generic npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” npm ERR! node v4.4.2 npm ERR! npm v2.15.0 npm ERR! code ELIFECYCLE

npm ERR! rclnodejs@0.3.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the rclnodejs@0.3.1 install script ‘node-gyp rebuild’. npm ERR! This is most likely a problem with the rclnodejs package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs rclnodejs npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm ERR! npm owner ls rclnodejs npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/username/ros2-web-bridge/npm-debug.log

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:35 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
minggangwcommented, Jan 29, 2018

The latest release of rclnodejs has resolved this problem. If you install a unqualified version of Node.js, you will receive a warning which indicates to upgrade your Node.js. Close this issue.

1reaction
qiuzhongcommented, Jan 25, 2018

Suggest to upgrade Node.js version as rclnodejs doesn’t support for Node.js 4.x series. Your Node.js version should not be lower than 6.10.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve npm install error “npm ERR! code 1”
The quick solution ... Now remove this npm package from package.json and see if the installation works. If it works you've found the...
Read more >
Resolving EACCES permissions errors when installing ...
This is the best way to avoid permissions issues. To reinstall npm with a node version manager, follow the steps in "Downloading and...
Read more >
NodeJS - npm install errors on Windows - YouTube
NOTE: If you are using Windows 10, you will want to open an Administrator PowerShell (right-click and choose "Run as administrator").
Read more >
5 Ways to Fix the Npm Install Not Working Issue
The main cause of the npm command not found error is that npm is not installed. You can run the command “npm -v”...
Read more >
Npm Install is failing for SPFx webpart - Microsoft Q&A
Hi @sns1 , To fix this error, you can follow the steps. ... clean npm as administrator. ... If the answer is helpful,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found