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.

“npm install” error

See original GitHub issue

I git clone this rep, and I run “npm install”, then get the error: npm install

ref@1.3.5 install /home/hzh/xinliu/ros2-web-bridge/node_modules/ref node-gyp rebuild

make: Entering directory ‘/home/hzh/xinliu/ros2-web-bridge/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()). ^ In file included from …/…/nan/nan.h:197:0, from …/src/binding.cc:7: …/…/nan/nan_maybe_43_inl.h:130: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()). ^ In file included from …/…/nan/nan.h:197:0, from …/src/binding.cc:7: …/…/nan/nan_maybe_43_inl.h:130: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] ed(), Nan::Newv8::String(CheckEndianness()).ToLocalChecked(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)); ^ In file included from …/…/nan/nan.h:197:0, from …/src/binding.cc:7: …/…/nan/nan_maybe_43_inl.h:130: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<PropertyAttribu ^ In file included from …/…/nan/nan.h:197:0, from …/src/binding.cc:7: …/…/nan/nan_maybe_43_inl.h:130: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<PropertyAttribu ^ In file included from …/…/nan/nan.h:197:0, from …/src/binding.cc:7: …/…/nan/nan_maybe_43_inl.h:130: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] n::Newv8::String(“NULL”).ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)); ^ In file included from …/…/nan/nan.h:197:0, from …/src/binding.cc:7: …/…/nan/nan_maybe_43_inl.h:130: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/hzh/xinliu/ros2-web-bridge/node_modules/ref/build’

puppeteer@1.7.0 install /home/hzh/xinliu/ros2-web-bridge/node_modules/puppeteer node install.js

Downloading Chromium r579032 - 102.3 Mb [====================] 100% 0.0s Chromium downloaded to /home/hzh/xinliu/ros2-web-bridge/node_modules/puppeteer/.local-chromium/linux-579032

rclnodejs@0.4.2 install /home/hzh/xinliu/ros2-web-bridge/node_modules/rclnodejs node-gyp rebuild

console.log(process.env.COLCON_PREFIX_PATH.replace(/😕, '/include/ ') + ‘/include/’) ^

TypeError: Cannot read property ‘replace’ of undefined at eval:1:44 at ContextifyScript.Script.runInThisContext (vm.js:50:33) at Object.runInThisContext (vm.js:139:38) at Object.<anonymous> (eval-wrapper:6:22) at Module._compile (module.js:652:30) at evalScript (bootstrap_node.js:466:27) at startup (bootstrap_node.js:167:9) at bootstrap_node.js:612:3 gyp: Call to ‘node -e “console.log(process.env.COLCON_PREFIX_PATH.replace(/😕, '/include/ ') + ‘/include/’)”’ 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/lib/node_modules/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 Linux 4.15.0-30-generic gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” gyp ERR! cwd /home/hzh/xinliu/ros2-web-bridge/node_modules/rclnodejs gyp ERR! node -v v8.11.2 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! rclnodejs@0.4.2 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the rclnodejs@0.4.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/hzh/.npm/_logs/2018-08-21T11_36_13_719Z-debug.log

and the node version is v8.11.2 , nvm version is : 0.33.11

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lxbeyondcommented, Aug 22, 2018

I changed package.json “rclnodejs”: “git://github.com/RobotWebTools/rclnodejs.git#bouncy-bolson”, and it works, thanks @minggangw @qiuzhong

0reactions
minggangwcommented, Aug 22, 2018

So I think this issue can be closed now, feel free to reopen if you meet any problem in the future. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common errors | npm Docs
SSL Error · upgrade your version of npm npm install npm -g --ca="" · tell your current version of npm to use known...
Read more >
npm install error from the terminal - Stack Overflow
My code npm install on cmd failed · So instead of npm i used Yarn · Just type yarn install instead of npm...
Read more >
How to solve npm ERR! code 1 when running npm install
Fix npm error code 1 by updating your dependencies · Update one package version in package.json file · Then run npm install ·...
Read more >
NPM install error - Material Design for Bootstrap
p>Trying to install MDB pro 4.19.2 just downloaded and ran npm install but getting this error of sha512 not matching. Can someone tell...
Read more >
Step by step solution for npm install error - M220JS - MongoDB
Step by step solution for npm install error · Download the zip file. · Unzip it on any directory on your computer/laptop. ·...
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