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

Fresh installation: Cannot find module '_debugger' #1040

Open
Bizarrus opened this issue Apr 19, 2018 · 1 comment
Open

Fresh installation: Cannot find module '_debugger' #1040

Bizarrus opened this issue Apr 19, 2018 · 1 comment

Comments

@Bizarrus
Copy link

`root@host:/opt/# npm i node-inspector -g
/usr/bin/node-inspector -> /usr/lib/node_modules/node-inspector/bin/inspector.js
/usr/bin/node-debug -> /usr/lib/node_modules/node-inspector/bin/node-debug.js

  • node-inspector@1.1.2
    updated 1 package in 6.757s
    root@rs-zap340838-1:/opt/chatserver# node-inspector
    internal/modules/cjs/loader.js:550
    throw err;
    ^

Error: Cannot find module '_debugger'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object. (/usr/lib/node_modules/node-inspector/lib/debugger.js:2:16)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
`

@zhidelin
Copy link

zhidelin commented May 1, 2018

nodejs only under v8.x can use _debugger
I copy https://github.com/nodejs/node/blob/v7.x/lib/_debugger.js to node-inspector/lib/_debugger.js
In node-insspector/lib/debugger.js: require('_debugger') change to require('./_debugger')
And use 'node --inspect-brk' command
It's OK

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

2 participants