2017-01-27 5 views
1

here에서 npm install을 실행한다고 표시 되지만 sudo npm install을 실행하면이 오류가 발생합니다. sudo는없는npm 설치를 실행할 수 없습니다

sudo npm install 
npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/mg/package.json' 
npm WARN mg No description 
npm WARN mg No repository field. 
npm WARN mg No README data 
npm WARN mg No license field. 

는 :

npm install 
npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/mg/package.json' 
npm WARN mg No description 
npm WARN mg No repository field. 
npm WARN mg No README data 
npm WARN mg No license field. 
npm ERR! Linux 4.4.0-59-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" 
npm ERR! node v4.2.6 
npm ERR! npm v3.5.2 
npm ERR! path /var/www/html/mg/node_modules/.staging 
npm ERR! code EACCES 
npm ERR! errno -13 
npm ERR! syscall mkdir 

npm ERR! Error: EACCES: permission denied, mkdir '/var/www/html/mg/node_modules/.staging' 
npm ERR!  at Error (native) 
npm ERR! { [Error: EACCES: permission denied, mkdir '/var/www/html/mg/node_modules/.staging'] 
npm ERR! errno: -13, 
npm ERR! code: 'EACCES', 
npm ERR! syscall: 'mkdir', 
npm ERR! path: '/var/www/html/mg/node_modules/.staging' } 
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!  /var/www/html/mg/npm-debug.log 
+0

당신이 sudo를하지 않고 시도? –

+0

OP에서 편집을 참조하십시오. – Rudolph

+0

package.json을 추가 할 수 있습니까? 이 문제는 일반적으로이 파일이 없을 때 발생합니다. –

답변

관련 문제