2017-09-04 14 views
1

인 경우 Laravel 5.5 + Vue.js 2.x의 새 프로젝트를 만들 때 문제가 있습니다. 이걸 실행 한 후 메시지입니다.Laravel 5.5 + Vue.js 2.x 프로젝트가 npm에서 작동하지 않습니다. dev가

npm install 
npm run dev 


> @ dev /Volumes/Work/Work/Vue/CRUD 
> npm run development 


> @ development /Volumes/Work/Work/Vue/CRUD 
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js 

95% emitting                   

DONE Compiled successfully in 2830ms                       6:01:15 PM 

internal/child_process.js:325 
    throw errnoException(err, 'spawn'); 
    ^

Error: spawn EACCES 
    at _errnoException (util.js:1041:11) 
    at ChildProcess.spawn (internal/child_process.js:325:11) 
    at exports.spawn (child_process.js:493:9) 
    at Object.exports.execFile (child_process.js:208:15) 
    at Object.module.exports.fileCommand (/Volumes/Work/Work/Vue/CRUD/node_modules/node-notifier/lib/utils.js:53:13) 
    at NotificationCenter.notify (/Volumes/Work/Work/Vue/CRUD/node_modules/node-notifier/notifiers/notificationcenter.js:66:11) 
    at module.exports.WebpackNotifierPlugin.compilationDone (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack-notifier/index.js:62:18) 
    at Compiler.applyPlugins (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:61:14) 
    at emitRecords.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:268:11) 
    at Compiler.emitRecords (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:375:38) 
    at emitAssets.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:262:10) 
    at applyPluginsAsyncSeries1.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:368:12) 
    at next (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:218:11) 
    at Compiler.compiler.plugin (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4) 
    at Compiler.applyPluginsAsyncSeries1 (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:222:13) 
    at Compiler.afterEmit (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:365:9) 
    at require.forEach.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:354:15) 
    at /Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:421:16 
    at iteratorCallback (/Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:998:13) 
    at /Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:906:16 
    at /Volumes/Work/Work/Vue/CRUD/node_modules/graceful-fs/graceful-fs.js:43:10 
    at FSReqWrap.oncomplete (fs.js:135:15) 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the @ development 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!  /Users/paladin2/.npm/_logs/2017-09-04T08_01_15_242Z-debug.log 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! @ dev: `npm run development` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the @ dev 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!  /Users/paladin2/.npm/_logs/2017-09-04T08_01_15_321Z-debug.log 

누구도 과거에 같은 문제가 있었습니까?

+0

nodejs의 버전은 무엇입니까? – Wreigh

+0

파일 사용 권한을 확인하십시오. – Ohgodwhy

+0

내 Node.js 버전 8 –

답변

0

그 폴더의 권한 부여 문제가 있다고 생각합니다.

이렇게 폴더 사용 권한을 설정할 때 내 컴퓨터에서 정상적으로 작동합니다.

는 chmod -R 765 [폴더 이름]

감사합니다. NPM 업데이트가 작동하지 않습니다 chmod -R u+x node_modules/

0

오늘 아침부터 같은 문제가 있었는데 최근에 npm 버전을 업데이트 한 것을 기억했습니다. 새 프로젝트를 만들고 실행 한 경우 npm install && npm run dev 같은 문제가 있습니다. 지금 NPM 실행 dev에 모든 것이 잘 작동 실행하면 npm install -g [email protected]

: 나를 위해 임시 솔루션입니다

은/NPM을 다운 그레이드하는 것이 었습니다.

+1

편집 : 이것은 새로 설치된 Laravel 프로젝트의 문제 만 해결했음을 알게되었습니다. 하지만이 [링크] (https://stackoverflow.com/questions/34562496/gulp-error-internal-child-process-js298-throw-errnoexceptionerr-spawn-err)를 우연히 발견했습니다. 'chmod -R u + x. '는 이번에 그것을 풀었다. – LJ1090

0

트릭을 수행합니다.

npm install –save-dev npm-install-webpack-plugin 
1

경우 명령에 의해 웹팩 수동으로 설치하십시오 : 사용자가 node_modules에 실행 권한을 부여