2016-02-25 10 views
1

Я новичок в Angular2, когда я пытаюсь запустить сервер НПМ npm start в папке проекта я получил эти ошибкиОшибка при запуске npm?

> [email protected] start /home/no-one/Desktop/Frontend 
> npm run front 


> [email protected] front /home/no-one/Desktop/Frontend 
> webpack-dev-server --inline -d --colors --display-error-details --display-cached --port 3000 

sh: 1: webpack-dev-server: Permission denied 

npm ERR! Linux 3.19.0-51-generic 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "front" 
npm ERR! node v5.6.0 
npm ERR! npm v3.7.3 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] front: `webpack-dev-server --inline -d --colors --display-error-details --display-cached --port 3000` 
npm ERR! Exit status 126 
npm ERR! 
npm ERR! Failed at the [email protected] front script 'webpack-dev-server --inline -d --colors --display-error-details --display-cached --port 3000'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the angular2-authentication-sample package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  webpack-dev-server --inline -d --colors --display-error-details --display-cached --port 3000 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular2-authentication-sample 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular2-authentication-sample 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/no-one/Desktop/Frontend/npm-debug.log 

А вот содержание NPM-debug.log:

> 0 info it worked if it ends with ok 1 verbose cli [ 
> '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using 
> [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 
> 'start', 'poststart' ] 5 info lifecycle 
> [email protected]~prestart: 
> [email protected] 6 silly lifecycle 
> [email protected]~prestart: no script for prestart, 
> continuing 7 info lifecycle 
> [email protected]~start: 
> [email protected] 8 verbose lifecycle 
> [email protected]~start: unsafe-perm in lifecycle 
> true 9 verbose lifecycle [email protected]~start: 
> PATH: 
> /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/no-one/Desktop/Frontend/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games 
> 10 verbose lifecycle [email protected]~start: CWD: 
> /home/no-one/Desktop/Frontend 11 silly lifecycle 
> [email protected]~start: Args: [ '-c', 'npm run 
> front' ] 12 silly lifecycle 
> [email protected]~start: Returned: code: 1 signal: 
> null 13 info lifecycle [email protected]~start: 
> Failed to exec start script 14 verbose stack Error: 
> [email protected] start: `npm run front` 14 verbose 
> stack Exit status 1 14 verbose stack  at EventEmitter.<anonymous> 
> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16) 14 
> verbose stack  at emitTwo (events.js:100:13) 14 verbose stack  
> at EventEmitter.emit (events.js:185:7) 14 verbose stack  at 
> ChildProcess.<anonymous> 
> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) 14 verbose 
> stack  at emitTwo (events.js:100:13) 14 verbose stack  at 
> ChildProcess.emit (events.js:185:7) 14 verbose stack  at maybeClose 
> (internal/child_process.js:827:16) 14 verbose stack  at 
> Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 
> 15 verbose pkgid [email protected] 16 verbose cwd 
> /home/no-one/Desktop/Frontend 17 error Linux 3.19.0-51-generic 18 
> error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 19 error 
> node v5.6.0 20 error npm v3.7.3 21 error code ELIFECYCLE 22 error 
> [email protected] start: `npm run front` 22 error 
> Exit status 1 23 error Failed at the 
> [email protected] start script 'npm run front'. 23 
> error Make sure you have the latest version of node.js and npm 
> installed. 23 error If you do, this is most likely a problem with the 
> angular2-authentication-sample package, 23 error not with npm itself. 
> 23 error Tell the author that this fails on your system: 23 error  
> npm run front 23 error You can get information on how to open an issue 
> for this project with: 23 error  npm bugs 
> angular2-authentication-sample 23 error Or if that isn't available, 
> you can get their info via: 23 error  npm owner ls 
> angular2-authentication-sample 23 error There is likely additional 
> logging output above. 24 verbose exit [ 1, true ] 

PS: этот проект хорошо работал на других платформах (Windows) без каких-либо ошибок, даже я обновил npm и nodeJs до последних версий и ошибки все еще происходят. Пожалуйста, помогите и заблаговременно!

+0

вы можете сделать 'LS -h WebPack-DEV-server'? –

ответ

1

Я вижу разрешение, запрещенное в ваших журналах. У вас есть разрешение на выполнение команды webpack-dev-server? chmod 755 может исправить вашу проблему ...

Смотрите эту ссылку:

+0

похоже, что команда, с которой он работает *, действительно работает? так что это могут быть другие права доступа к файлам или символическая проблема связи –

+0

да это может быть ;-) –

Смежные вопросы