atom-node-debugger icon indicating copy to clipboard operation
atom-node-debugger copied to clipboard

Cannot find module '_debugger'

Open billgertz opened this issue 7 years ago • 11 comments
trafficstars

  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)

billgertz avatar Jul 14 '18 10:07 billgertz

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

JonMontgo avatar Jul 20 '18 01:07 JonMontgo

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

owendall avatar Aug 09 '18 17:08 owendall

Duplicate of #261 and #259

robinrosenstock avatar Aug 16 '18 08:08 robinrosenstock

got this problem too

wangjin046 avatar Sep 21 '18 00:09 wangjin046

same problem. Is there any workaround??

Vijendra07Kulhade avatar Sep 25 '18 18:09 Vijendra07Kulhade

same, any solution?

zcaceres avatar Jan 05 '19 07:01 zcaceres

same, solution? anybody solved?

Oscar-Deng avatar Feb 03 '19 10:02 Oscar-Deng

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.

Rankyn avatar Mar 03 '19 21:03 Rankyn

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

Pysis868 avatar Mar 20 '19 14:03 Pysis868

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

Folaht avatar Jul 10 '19 15:07 Folaht

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:

  • https://stackoverflow.com/questions/50787132/xatom-debugger-connect-to-remote-node-inspector
  • https://github.com/xatom-plugins/xatom-debug-nodejs/issues/17

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.

Pysis868 avatar Dec 26 '20 19:12 Pysis868