esy version: @latest
Operating System: Fedora 33 Linux
Issue: Failed to install
Package.json
Actual behavior:
sudo npm install -g esy@latest
/usr/local/bin/esy -> /usr/local/lib/node_modules/esy/_build/default/bin/esy.exe[email protected] postinstall /usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf
node ./postinstall.jsinternal/fs/utils.js:307
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:772:3)
at install (/usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf/postinstall.js:10:6)
at Object.(/usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf/postinstall.js:16:5)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
errno: -13,
syscall: 'rename',
code: 'EACCES',
path: '/usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf/platform-linux/esySolveCudfCommand.exe',
dest: '/usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf/esySolveCudfCommand.exe'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall:node ./postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-13T22_33_00_179Z-debug.log
Expected behavior:
Additional steps to reproduce:
exact same error here
We're working on a new release. Can you try npm i -g esy@next (or the equivalent yarn global add esy@next) and let us know if it still repros?
after manually cleaning up the symlinks in /usr/local/bin I get this output
as a workaround, sudo npm install -g esy@latest --unsafe-perm=true --allow-root shall work
Most helpful comment
as a workaround,
sudo npm install -g esy@latest --unsafe-perm=true --allow-rootshall work