Upgrading to APM 1.11.4 and encountering libgit errors


I was having trouble running apm rebuild on the atom-typescript package because fs-events was failing to build. From some Googling I believe this is because apm is executing node-pre-gyp using node 0.10.x. Looking through the apm repo I found a PR that has been merged updating apm's node version to 4.x (whatever LTS is).

This version of apm is not currently shipped with Atom, so I proceed to install it via npm uninstall -g atom-package-manager && npm install -g atom-package-manager. Now when running apm --version I receive the following output :

  return process.dlopen(module, path._makeLong(filename));

Error: Module version mismatch. Expected 46, got 48.
    at Error (native)
    at Object.Module._extensions..node (module.js:434:18)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/dawsonreid/.nvm/versions/node/v6.2.1/lib/node_modules/atom-package-manager/node_modules/git-utils/lib/git.js:8:16)
    at Object.<anonymous> (/Users/dawsonreid/.nvm/versions/node/v6.2.1/lib/node_modules/atom-package-manager/node_modules/git-utils/lib/git.js:371:4)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Any help would be appreciated, and I can provide any further information needed to support resolving this issue.


You should use the version of apm that is bundled with the version of Atom you are running. Using a different version of apm will cause problems. There really isn’t a solution for it.


Thanks for getting back to me @leedohm. I am going to start digging through the apm repo on Github. I would really like to be able to use newer versions and I expect the developers of apm have some way of doing so.


Yes, we do. We develop apm with the master version of Atom built from source. We don’t use apm with older versions of Atom that it wasn’t meant to be bundled with.