Rebuilding latex, autocomplete-latex fails on node-gyp permission


#1

I have 1.32.0_beta3 installed on gentoo linux. When I start atom, I am informed that two packages “could not be loaded because they contain native modules that were compiled for an earlier version of Atom.” Attempting to rebuild the packages both fails with the same error:

/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: line 5: /usr/share/atom/resources/app/apm/bin/../node_modules/.bin/node-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! oniguruma@6.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the oniguruma@6.2.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Since that node-gyp file is provided as part of the atom install, I assume that its misconfiguration (it also points to the wrong directory to find the link to node-gyp.js) is a problem with atom.

How can I fix this?

Thanks in advance for the help,

EE


#2

What happens if you uninstall the packages and tell Atom to redownload them?

That’s not a good assumption. It’s not usual for files under node_modules/ to be modified from the way NPM sets them up when they’re installed (and it’s poor practice to do so because you risk losing your changes if you forget that you made them). In the case of Node packages that have to be configured for each project (such as linters), there’s usually a config file placed in the main project folder.


#3

Well, in my case, the command

equery b node-gyp

in that directory returns that it belongs to the atom package.

Which packages? All of those files were installed from the gentoo ebuild. Is this something I should take up with the gentoo package maintainer?

Cheers,

EE


#4

Yes, as a dependency. It’s not part of Atom’s code.

Which packages?

I don’t know because you haven’t shared that information with us, or any screenshots that a more experienced user could explain to you. You said that two packages were giving you this error.

All of those files were installed from the gentoo ebuild. Is this something I should take up with the gentoo package maintainer?

If you’re using an unofficial distribution, then that’s important information that you should share any time you make a thread asking for help. In this case, I don’t yet have any reason to suspect that the ebuild is at fault. Just see if reinstalling solves the problem for those two packages and we’ll go from there.


#5

Right. Here’s a screenshot:

That’s the package that fails. autocomplete-latex was also failing with the same error, but since I have other latex autocomplete packages installed, I can drop it for now.

from gentoo, I have installed app-editors/atom-1.32.0_beta3, which is from the unofficial cynede overlay. I am also trying to install the atom-9999 (ie, built directly from git) version from the mva overlay, but that one is failing to build for other reasons that I’m trying to resolve with gentoo.

Does any of this help you?

Cheers,

EE


#6

What happens if you uninstall latex and autocomplete-latex and then reinstall them?


#7

I uninstalled both and attempted reinstall of the latex package. That screenshot is from after I tried reinstalling (though it’s the same message I was getting before).


#8

What happens if you install Atom from the prebuilt .tar.gz file at the releases page?