fedora 33 npm failed to install
sudo npm i -g star npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: Use cheerio-select instead npm WARN deprecated [email protected]: this library is no longer supported /usr/local/bin/star -> /usr/local/lib/node_modules/star/star.js
[email protected] install /usr/local/lib/node_modules/star/node_modules/iconv node-gyp rebuild
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.15.4"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/star/node_modules/iconv/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/star/node_modules/iconv/.node-gyp'
gyp ERR! System Linux 5.8.15-301.fc33.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/star/node_modules/iconv
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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-02-24T07_42_32_981Z-debug.log
Try this:
sudo npm install -g node-gyp
sudo npm install -g [email protected]
sudo npm install --unsafe-perm=true --allow-root -g iconv
sudo npm install --unsafe-perm=true --allow-root -g star
Success!