imagemin / gifsicle-bin

gifsicle bin-wrapper that makes it seamlessly available as a local dependency
http://www.lcdf.org/gifsicle/
MIT License
112 stars 52 forks source link

NodeJS 14.18 Error: EACCES: permission denied, stat #123

Open andreevpix opened 2 years ago

andreevpix commented 2 years ago
npm install gifsicle

npm ERR! code 1
npm ERR! path /srv/site/node_modules/gifsicle
npm ERR! command failed
npm ERR! command sh -c node lib/install.js
npm ERR! /srv/site/node_modules/npm-conf/lib/conf.js:169
npm ERR!            throw err;
npm ERR!            ^
npm ERR! 
npm ERR! Error: EACCES: permission denied, stat '/root/.nvm/versions/node/v14.18.0'
npm ERR!     at Object.statSync (node:fs:1536:3)
npm ERR!     at Conf.loadUser (/srv/site/node_modules/npm-conf/lib/conf.js:162:21)
npm ERR!     at module.exports (/srv/site/node_modules/npm-conf/index.js:32:7)
npm ERR!     at Object.<anonymous> (/srv/site/node_modules/get-proxy/index.js:2:36)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR!     at require (node:internal/modules/cjs/helpers:102:18) {
npm ERR!   errno: -13,
npm ERR!   syscall: 'stat',
npm ERR!   code: 'EACCES',
npm ERR!   path: '/root/.nvm/versions/node/v14.18.0'
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-29T20_42_33_042Z-debug.log
node -v
v14.18.0

npm -v
7.24.0
whoami
root
1000ch commented 2 years ago

What happens when you try to install another package in the same directory & permission?