Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install esy on Ubuntu 20.04 #1099

Open
wesleybits opened this issue May 14, 2020 · 6 comments
Open

Unable to install esy on Ubuntu 20.04 #1099

wesleybits opened this issue May 14, 2020 · 6 comments
Labels
installer npm fails to install esy globally. Distro specific installers could be the solution npm-compat Compatibility issue with standard npm install

Comments

@wesleybits
Copy link

wesleybits commented May 14, 2020

esy version: latest
Operating System: Ubuntu 20.04

Issue: npm fails to install esy. Error message:

> esy-solve-cudf@0.1.10 postinstall /usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf
> node ./postinstall.js

fs.js:114
    throw err;
    ^

Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf/platform-linux/esySolveCudfCommand.exe' -> '/usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf/esySolveCudfCommand.exe'
    at Object.renameSync (fs.js:598:3)
    at install (/usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf/postinstall.js:10:6)
    at Object.<anonymous> (/usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf/postinstall.js:16:5)
    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)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! esy-solve-cudf@0.1.10 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the esy-solve-cudf@0.1.10 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Likely cause: https://github.com/andreypopp/esy-solve-cudf/blob/d293f2116def0b0b02eef487158ae440d21cc8db/postinstall.js#L17

I would volunteer to fix it, but without a working esy install, that would be rather difficult to test the fix.

Package.json None yet.

Actual behavior: See above.

Expected behavior: npm is able to globally install esy easily.

Additional steps to reproduce:

  1. On a fresh instance of Ubuntu 20.04:
$ sudo apt install npm
$ sudo npm install -g npm
[...]
$ sudo npm install -g esy@latest
@andreypopp
Copy link
Member

andreypopp commented May 15, 2020

Try sudo npm install -g --unsafe-perm esy Invocation. The unsafe-perm flag is needed when installing with sudo.

@wesleybits
Copy link
Author

That just fetches the bundle, and seems to do no build. I don't see the usual artifacts in /usr/local/lib/npm_packages/esy/, and the paths where the usual distribution artifacts would be post-build are missing.

Are we certain that the line I linked from esy's dependency solver isn't the culprit (a decimal number where something in octal seems to be implied)? I would submit a fix, but without esy, I have no means to test it.

@ManasJayanth
Copy link
Member

@wesleybits Could you try to install it in a different prefix (something like ~/.npm) with npm i -g esy --prefix ~/.npm (assumming you have permissions at ~/.npm)

@ManasJayanth ManasJayanth added installer npm fails to install esy globally. Distro specific installers could be the solution npm-compat Compatibility issue with standard npm install labels Jun 10, 2020
@AkechiShiro
Copy link

@ManasJayanth I can confirm that the install using the prefix option works fine, given that permission are well defined for the prefix folder ~/.npm.

@ManasJayanth
Copy link
Member

Thanks! We'll working on improving the error message.

@ghost
Copy link

ghost commented Dec 13, 2020

I ran into this error when trying to run npm install -g esy (no sudo) inside of a Vercel deploy. Most likely, Vercel is using amazon linux docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installer npm fails to install esy globally. Distro specific installers could be the solution npm-compat Compatibility issue with standard npm install
Projects
None yet
Development

No branches or pull requests

4 participants