kiddkai / atom-node-debugger

A Nodejs Debugger For Atom
MIT License
265 stars 75 forks source link

Cannot find module '_debugger' #263

Open billgertz opened 5 years ago

billgertz commented 5 years ago
  1. Start Atom
  2. Pops up at startup:
Error: Cannot find module '_debugger'
    at Module._resolveFilename (module.js:543:15)
    at Module._resolveFilename (/Applications/Development/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/Applications/Development/Atom.app/Contents/Resources/app/src/module-cache.js:354:58)
    at Module.require (file:///Applications/Development/Atom.app/Contents/Resources/app.asar/static/index.js:40:43)
    at require (/Applications/Development/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:33)
    at Object.<anonymous> (/Users/bgertz/.atom/packages/node-debugger/lib/debugger.coffee:5:12)
    at Object.<anonymous> (/Users/bgertz/.atom/packages/node-debugger/lib/debugger.coffee:1:1)
    at Object.<anonymous> (/Users/bgertz/.atom/packages/node-debugger/lib/debugger.coffee:1:1)
    at Module.get_Module._compile (/Applications/Development/Atom.app/Contents/Resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .coffee] (/Applications/Development/Atom.app/Contents/Resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (file:///Applications/Development/Atom.app/Contents/Resources/app.asar/static/index.js:47:45)
    at require (/Applications/Development/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:33)
    at Object.<anonymous> (/Users/bgertz/.atom/packages/node-debugger/lib/node-debugger.coffee:2:14)
    at Object.<anonymous> (/Users/bgertz/.atom/packages/node-debugger/lib/node-debugger.coffee:1:1)
    at Object.<anonymous> (/Users/bgertz/.atom/packages/node-debugger/lib/node-debugger.coffee:1:1)
    at Module.get_Module._compile (/Applications/Development/Atom.app/Contents/Resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .coffee] (/Applications/Development/Atom.app/Contents/Resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (file:///Applications/Development/Atom.app/Contents/Resources/app.asar/static/index.js:47:45)
    at require (internal/module.js:11:18)
    at customRequire (/Applications/Development/Atom.app/Contents/Resources/app/static/<embedded>:96:26)
    at Package.requireMainModule (/Applications/Development/Atom.app/Contents/Resources/app/src/package.js:782:33)
    at Package.activateNow (/Applications/Development/Atom.app/Contents/Resources/app/src/package.js:220:40)
    at measure (/Applications/Development/Atom.app/Contents/Resources/app/src/package.js:206:33)
    at Package.measure (/Applications/Development/Atom.app/Contents/Resources/app/src/package.js:88:25)
    at activationPromise.Promise (/Applications/Development/Atom.app/Contents/Resources/app/src/package.js:200:20)
    at new Promise (<anonymous>)
    at Package.activate (/Applications/Development/Atom.app/Contents/Resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (/Applications/Development/Atom.app/Contents/Resources/app/src/package-manager.js:695:42)
    at config.transactAsync (/Applications/Development/Atom.app/Contents/Resources/app/src/package-manager.js:670:36)
    at Config.transactAsync (/Applications/Development/Atom.app/Contents/Resources/app/src/config.js:866:28)
JonMontgo commented 5 years ago

Seems like the _debugger module was removed from node in v8 https://github.com/nodejs/node/commit/90476ac6ee

owendall commented 5 years ago

I still get this every time I open Atom...

robinrosenstock commented 5 years ago

Duplicate of #261 and #259

wangjin046 commented 5 years ago

got this problem too

Vijendra07Kulhade commented 5 years ago

same problem. Is there any workaround??

zcaceres commented 5 years ago

same, any solution?

Oscar-Deng commented 5 years ago

same, solution? anybody solved?

Rankyn commented 5 years ago

There does not seem to be a solution to this issue, or support for the package. Someone else suggested using atonm-ide-debgger-node, but that package is not intuitive, and does not have a list of commands.

Pysis868 commented 5 years ago

Just redirect to this from the Atom error reporter that simply suggests uninstalling this package: https://github.com/kiddkai/atom-node-debugger/issues/266

Folaht commented 4 years ago

Yes, but it suggests to get rid of Atom and I love atom.

So the trick is to find a working nodejs-debugger:

apm uninstall node-debugger

apm install xatom-debug xatom-ui xatom-syntax
Pysis868 commented 3 years ago

I certainly want to use some solution for Atom, but there seem to be a lot of old, out-dated, or broken articles or packages.

This xatom stuff seems to be pretty good adding UI to Atom, although all that exist now are xatom-debug and xatom-debug-nodejs that I used for my exercise. It did give me information and correct breakpointing, but I receive the error "XAtom Debug: Unable to map file" that I have found at these links:

Although I'm not trying to do anything remote, just a local fs script as I can describe in that issue link..

Just want to find a decent debugging solution for NodeJS projects and Atom, or at least through the CLI. So many old or broken articles, programs and such like node-debug, node-debugger, node-inspect, node-inspector, atom-ide-debugger-node, and now this xatom- one. Wanted to keep it simple to inside Atom or on CLI to keep development fast outside of the Chrome DevTools connection, although that is nice to use.