$ npm install vue-cli -g
npm ERR! Linux 3.10.0-957.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "vue-cli" "-g"
npm ERR! node v6.16.0
npm ERR! npm v3.10.10
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/app_manager/npm-debug.log
EACCESS 에러는 패키지를 글로벌로 설치할 때 발생.
node prefix 가 PATH ENV 안에 없어서 글로벌로 설치된 모듈들이 인식 되지 않아서 에러 발생.
( https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally )
[ 해결 ]
$ mkdir ~/.npm-global
$ npm config set prefix '~/.npm-global'
$ export PATH=~/.npm-global/bin:$PATH
$ source ~/.profile
$ source ~/.bash_profile
$ npm install vue-cli -g
'JavaScript > Vue' 카테고리의 다른 글
[Vue] 외부에서 접근 (0) | 2019.07.10 |
---|---|
[Vue] 로딩 속도 개선 (0) | 2019.07.10 |