2016-10-25 8 views
0

부적절한 가상 머신을 설치하고 nodejs (v 6.9.1) 및 npm (v 4.0.0)을 설치했습니다. git clone으로 nodejs 앱을 복제하고 루트 폴더와 app 폴더에 npm install 명령을 실행했습니다. 내가 npm start를 통해 응용 프로그램을 시작하려고 할 때, 그것은npm start를 실행하지 못했습니다.

스택 실패

[email protected]:~/work/newair/app$ npm start -verbose 
npm info it worked if it ends with ok 
npm verb cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start', '-verbose' ] 
npm info using [email protected] 
npm info using [email protected] 
npm verb run-script [ 'prestart', 'start', 'poststart' ] 
npm info lifecycle [email protected]~prestart: [email protected] 
npm info lifecycle [email protected]~start: [email protected] 

> [email protected] start /home/vagrant/work/newair/app 
> electron main.js 


npm verb lifecycle [email protected]~start: unsafe-perm in lifecycle true 
npm verb lifecycle [email protected]~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/vagrant/work/newair/app/node_modules/.bin:/home/vagrant/.rvm/gems/ruby-2.3.0/bin:/home/vagrant/.rvm/gems/[email protected]/bin:/home/vagrant/.rvm/rubies/ruby-2.3.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/vagrant/.rvm/bin:/home/vagrant/.rvm/bin 
npm verb lifecycle [email protected]~start: CWD: /home/vagrant/work/newair/app 
npm info lifecycle [email protected]~start: Failed to exec start script 
npm verb stack Error: [email protected] start: `electron main.js` 
npm verb stack Exit status 1 
npm verb stack  at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:277:16) 
npm verb stack  at emitTwo (events.js:106:13) 
npm verb stack  at EventEmitter.emit (events.js:191:7) 
npm verb stack  at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) 
npm verb stack  at emitTwo (events.js:106:13) 
npm verb stack  at ChildProcess.emit (events.js:191:7) 
npm verb stack  at maybeClose (internal/child_process.js:877:16) 
npm verb stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 
npm verb pkgid [email protected] 
npm verb cwd /home/vagrant/work/newair/app 
npm ERR! Linux 3.13.0-100-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" "-verbose" 
npm ERR! node v6.9.1 
npm ERR! npm v4.0.0 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `electron main.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'electron main.js'. 
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 pykihAIR package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  electron main.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs pykihAIR 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls pykihAIR 
npm ERR! There is likely additional logging output above. 
npm verb exit [ 1, true ] 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/vagrant/work/newair/app/npm-debug.log 
+0

'/ home/vagrant/work/newair/app' 안에'main.js' 파일이 있습니까? 같은 디렉토리에서'electron'을 실행할 수 있습니까? –

+0

예. 'main.js'는 앱 폴더 안에 있습니다. –

+0

'electron main.js' 명령이 작동합니까? –

답변

0

코멘트를 통해 논의 후에는 electron 패키지가 설치되지 않은 것으로 보인다.

로컬로 설치하려면 npm install --save electron을 실행하고 --save 플래그를 사용하여 package.json 파일에 정의를 씁니다.

글로벌 이길 원할 경우 npm install -g electron을 실행하면 컴퓨터의 다른 곳에서도 실행할 수 있습니다.

+0

전 세계를 비롯하여 앱을 설정하는 동안'전자 '패키지를 설치했습니다. 'electron main.js'를 실행해도 오류가 발생하거나 앱이 시작되지 않습니다. –

+0

'./node_modules/.bin/electron'이 작동합니까? –

+0

아니요. ./ node_modules/.bin/electron'과 동일한 문제가 있습니다. –

관련 문제