Apm not working : error in cjs loader

Here is what I get:

$ apm list
  return process.dlopen(module, path.toNamespacedPath(filename));

Error: /usr/lib/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node: undefined symbol: _ZN2v82V818GlobalizeReferenceEPNS_8internal7IsolateEPm
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/src/git.js:3:22)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)

And GUI does not work as well:

I’m also having this happen.

Mines a fresh install on Arch Linux too.

So for me the problem was Arch had a older version of nodejs installed for some reason. I installed the latest nodejs and now atom works properly.

Thanks for the tip!

That solved it for me too!

yay -S nodejs
resolving dependencies…
looking for conflicting packages…
:: nodejs and nodejs-lts-dubnium are in conflict. Remove nodejs-lts-dubnium? [y/N] y

1 Like

You probably want to manage NodeJS versions with nvm (aur). This makes it easy to work with multiple NodeJS versions (and I’ve never seen it conflict with apm like the normal system node has for me).