tensor5 / arch-atom

Repository of Atom and Electron binary packages for Arch Linux
48 stars 5 forks source link

APM needs to be re-compiled against Node.js 7 #42

Closed fusion809 closed 8 years ago

fusion809 commented 8 years ago

Hi,

Whenever I run apm update I get the error message:

module.js:600
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The module '/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
    at Object.Module._extensions..node (module.js:600:18)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/lib/git.js:8:16)
    at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/lib/git.js:371:4)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)

this error message seems to me to be saying you need to re-compile APM against the new Node.js. So please bump APM's pkgrel to get the Arch Linux build servers to do the required rebuild.

Thanks for your time, Brenton

tensor5 commented 8 years ago

Thanks. I reported it the nodejs maintener https://bugs.archlinux.org/task/51628.

Xananax commented 6 years ago

Seems like this is back? Trying to install packages in Atom gives me the above error. Running APM on the command line gives me same.

What I did was:

tensor5 commented 6 years ago

@Xananax, can you tell me what is the apm command that triggered the error and the exact output?

Xananax commented 6 years ago

I was opening the settings view:install packages and themes panel inside Atom. I also got a separate notification about being unable to update the "React" package.

Unfortunately my memory is really bad, and I was doing a bunch of things at the same time. I triggered the above error by either just simply opening the panel or when I tried to install/update packages.

I didn't even know what APM was, I just got the error in the Atom console at the bottom. I figured it was probably a separate package manager for Atom, I went to a terminal and I'm pretty much certain I just ran apm with no arguments, but maybe I tried apm react.

I'm on Arch Linux, using the official atom package, with a fairly frequently updated system (every other day or so).

Xananax commented 6 years ago

Actually, I reinstalled the atom package from source, and I get the error again.

I confirm that I get it in atom when updating/installing, and in a terminal by simply running apm.

module.js:681
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The module '/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/lib/git.js:8:16)
    at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/lib/git.js:371:4)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)

Since I don't immediately need apm, I can leave it in that state if you'd like me to help in any way.

Please note that I previously tried pacman -S apm and it did not trigger the error. Installing atom did.

tensor5 commented 6 years ago

If I understand correctly you installed atom from source, without building it form this PKGBUILD. The Arch packages of apm and atom are designed so that apm uses the system installed node executable. If you build form source it may download its own version of node which uses NODE_MODULE_VERSION 57.

tensor5 commented 6 years ago

BTW, the command to update atom packages from the command line is apm update.

tensor5 commented 6 years ago

What version of nodejs are you running?

Xananax commented 6 years ago

If I understand correctly you installed atom from source, without building it form this PKGBUILD

I used the default package. However,

What version of nodejs are you running?

I think you put your finger on it; I don't have the regular nodejs package, I am using, for some reason nodejs-lts-carbon. I have no recollection of this, some package must've needed it and I switched them without thinking.

I confirm that if I uninstall pacman -R nodejs-lts-carbon and reinstall pacman -S nodejs, Apm & Atom both work. The problem was on my end, I'm truly sorry for the bother and the waste of time.

Thanks for the support!

tensor5 commented 6 years ago

Thanks for reporting, I will add the dependency nodejs>=9 in the next release.

bottlelee commented 3 years ago

I got this error too. But my solution is more simple.

Just go to '/usr/lib/node_modules/atom-package-manager/' and run sudo npm install git-utils.