Error in npm install, please suggest the possible solution.
See original GitHub issueref@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:
- Created 6 years ago
- Comments:35 (17 by maintainers)
Top GitHub Comments
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.
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 than6.10.0
.