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

ERROR on opening 'node-inspector' #18

Open
MathijsvVelde opened this issue Nov 16, 2015 · 5 comments
Open

ERROR on opening 'node-inspector' #18

MathijsvVelde opened this issue Nov 16, 2015 · 5 comments

Comments

@MathijsvVelde
Copy link

When I open node-inspector in the browser, I immediately get this error through the browser's console:

Error: Cannot find module '/usr/local/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.5.4/node-v46-darwin-x64/debug.node'

And there are no error thrown to the terminal.

I searched for the file and the closest match is '.../node-v47-darwin-x64/debug.node'
Your file, your issue?
Or should I submit this issue to the 'node-inspector' module?

@cudasteve
Copy link

Same issue here except that my node-inspector is as a dependency of gulp-node-inspector.

Was working previously with node 0.12. Now on node 4.2.2. Did npm install. Files on disk have v8-debug/build/debug/v0.5.4/node-v14-linux-x64/debug.node but not the v46 it's apparently looking for.

My versions of the various libraries involved:

  • gulp-node-inspector: 0.1.0
  • node-inspector: 0.12.3 (asking for ^0.12.2)
  • v8-debug: 0.5.4 (asking for ~0.5.0)

@3y3
Copy link
Member

3y3 commented Dec 3, 2015

npm install doesn't helpful here. Try:

npm uninstall -g node-inspector
npm i -g node-inspector

The trick is to completely delete v8-debug and v8-profiler folders from node-inspector project, because you need to recompile their containment. There is some other ways to fix this problem, but this one is most simple.

I recommend you to don't use node without nvm. nvm make it simple to recompile global modules after node version change.

@cudasteve
Copy link

@3y3 Thanks! That seemed to do it.

Thanks for the tip on nvm. I do use it on my host machine, but this was happening inside a vagrant vm that gets rebuilt from scratch whenever we upgrade. Though since that's the case, I'm not exactly sure why it didn't work the first time. ¯_(ツ)_/¯

@MathijsvVelde
Copy link
Author

@3y3, it didn't work on my side 😞
But I use it within my electron project and according to this tutorial doc electron has some stuff to fix before we can use node-inspector with electron

I did came across some errors (re)installing node-inspector.
Some stuff to look in to!!
✌️

$ sudo npm uninstall -g node-inspector
$ sudo npm install -g node-inspector
npm WARN deprecated lodash@2.4.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
npm WARN lifecycle v8-debug@0.7.0~preinstall: cannot run in wd %s %s (wd=%s) v8-debug@0.7.0 node -e 'process.exit(0)' /usr/local/lib/node_modules/.staging/v8-debug-d56ef3c156d39eeb44cda4964e0a85c5
npm WARN lifecycle v8-profiler@5.5.0~preinstall: cannot run in wd %s %s (wd=%s) v8-profiler@5.5.0 node -e 'process.exit(0)' /usr/local/lib/node_modules/.staging/v8-profiler-700a09d0cc4475efe8f794ecb7f798e3
/usr/local/bin/node-inspector -> /usr/local/lib/node_modules/node-inspector/bin/inspector.js
/usr/local/bin/node-debug -> /usr/local/lib/node_modules/node-inspector/bin/node-debug.js

> bufferutil@1.2.1 install /usr/local/lib/node_modules/node-inspector/node_modules/bufferutil
> node-gyp rebuild

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node

> utf-8-validate@1.2.1 install /usr/local/lib/node_modules/node-inspector/node_modules/utf-8-validate
> node-gyp rebuild

  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node

> v8-debug@0.7.0 install /usr/local/lib/node_modules/node-inspector/node_modules/v8-debug
> node-pre-gyp install --fallback-to-build

[v8-debug] Success: "/usr/local/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.7.0/node-v47-darwin-x64/debug.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> v8-profiler@5.5.0 install /usr/local/lib/node_modules/node-inspector/node_modules/v8-profiler
> node-pre-gyp install --fallback-to-build

[v8-profiler] Success: "/usr/local/lib/node_modules/node-inspector/node_modules/v8-profiler/build/profiler/v5.5.0/node-v47-darwin-x64/profiler.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
/usr/local/lib
└─┬ node-inspector@0.12.5 
  ├── async@0.9.2 
...

@cudasteve
Copy link

cudasteve commented Dec 17, 2015

Encountered the same issue when rebuilding for node v5. Uninstalling and reinstalling node-inspector worked again, so not really a big issue. Just confused as to why the original npm install doesn't seem to get it right but this does:

npm install
cd node_modules/gulp-node-inspector
npm uninstall node-inspector
npm install node-inspector

ZengJunyong added a commit to ZengJunyong/js-full-stack that referenced this issue Sep 19, 2016
    npm uninstall -g node-inspector
    npm i -g node-inspector
refer to: node-inspector/v8-debug#18, this can be debugged 1 line to 1 line.
current node version is v5.6.0, npm version is 3.10.3
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

3 participants