lang/node

NPM Permission Error

C/H 2019. 11. 13. 14:29

npm i 설치 permission 에러

npm ERR! Error: EACCES, open '/Users/username/.npm/-/all/.cache.json'
npm ERR!  { [Error: EACCES, open '/Users/username/.npm/-/all/.cache.json']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/username/.npm/-/all/.cache.json' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 12.2.0
npm ERR! command "node" "/usr/local/bin/npm" "search" "bower"
npm ERR! cwd /Users/username
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! path /Users/username/.npm/-/all/.cache.json
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/username/.npm/-/all/.cache.json'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/username/npm-debug.log
npm ERR! not ok code 0
~/.npm 의 소유자를 변경한다.
sudo chown -R $(whoami) ~/.npm

~/.config ACCESS 에러

┌──────────────────────────────────────────────────────────┐
│                 npm update check failed                  │
│           Try running with sudo or get access            │
│           to the local update config store via           │
│ sudo chown -R $USER:$(id -gn $USER) /home/ubuntu/.config │
└──────────────────────────────────────────────────────────┘
~/.config 소유자를 변경한다.
sudo chown -R $(whoami) ~/.config
반응형

'lang > node' 카테고리의 다른 글

linux watcher limit on pm2  (0) 2019.11.21
pm2 npm start  (0) 2019.11.14
jwtwebtoken  (0) 2019.04.12
Origin Policy Error on Sailsjs  (0) 2019.03.20
not support route and folder fot sails.js  (0) 2019.03.04