twilio-labs / plugin-rtc

Twilio CLI plugin which supports developing and deploying real-time communication apps
Apache License 2.0
38 stars 22 forks source link

Error code ELIFECYCLE (errno 2) for `npm run deploy:twilio-cli` #46

Closed leepowers closed 4 years ago

leepowers commented 4 years ago

Steps to Reproduce

git clone https://github.com/twilio/twilio-video-app-react
cd twilio-video-app-react
npm install
npm install twilio-cli -g
# Account SID and Auth Token from: https://www.twilio.com/console/
twilio login
twilio plugins:install @twilio-labs/plugin-rtc
npm run deploy:twilio-cli

^ Bug occurs on deploy last step with note:

» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: "https://github.com/twilio-labs/plugin-rtc"

Error Output

npm run deploy:twilio-cli -l debug

> twilio-video-app-react@0.1.0 deploy:twilio-cli /Users/leepowers/work/takeda/video-app/twilio-video-app-react
> cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build "debug"

> twilio-video-app-react@0.1.0 build /Users/leepowers/work/takeda/video-app/twilio-video-app-react
> node ./scripts/build.js

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  271.8 KB  build/static/js/2.4d5918e3.chunk.js
  15.15 KB  build/static/js/main.431b0198.chunk.js
  787 B     build/static/js/runtime-main.d9f235a9.js

 ›   Error: EEXIT: 1
 ›   Code: EEXIT
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! twilio-video-app-react@0.1.0 deploy:twilio-cli: `cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the twilio-video-app-react@0.1.0 deploy:twilio-cli 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:

Debug Log File

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/Cellar/node/14.10.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'deploy:twilio-cli'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v14.10.0
4 verbose run-script [
4 verbose run-script   'predeploy:twilio-cli',
4 verbose run-script   'deploy:twilio-cli',
4 verbose run-script   'postdeploy:twilio-cli'
4 verbose run-script ]
5 info lifecycle twilio-video-app-react@0.1.0~predeploy:twilio-cli: twilio-video-app-react@0.1.0
6 info lifecycle twilio-video-app-react@0.1.0~deploy:twilio-cli: twilio-video-app-react@0.1.0
7 verbose lifecycle twilio-video-app-react@0.1.0~deploy:twilio-cli: unsafe-perm in lifecycle true
8 verbose lifecycle twilio-video-app-react@0.1.0~deploy:twilio-cli: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/leepowers/work/takeda/video-app/twilio-video-app-react/node_modules/.bin:/Applications/dart-sass:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle twilio-video-app-react@0.1.0~deploy:twilio-cli: CWD: /Users/leepowers/work/takeda/video-app/twilio-video-app-react
10 silly lifecycle twilio-video-app-react@0.1.0~deploy:twilio-cli: Args: [
10 silly lifecycle   '-c',
10 silly lifecycle   'cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build'
10 silly lifecycle ]
11 silly lifecycle twilio-video-app-react@0.1.0~deploy:twilio-cli: Returned: code: 1  signal: null
12 info lifecycle twilio-video-app-react@0.1.0~deploy:twilio-cli: Failed to exec deploy:twilio-cli script
13 verbose stack Error: twilio-video-app-react@0.1.0 deploy:twilio-cli: `cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1047:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid twilio-video-app-react@0.1.0
15 verbose cwd /Users/leepowers/work/takeda/video-app/twilio-video-app-react
16 verbose Darwin 18.7.0
17 verbose argv "/usr/local/Cellar/node/14.10.0/bin/node" "/usr/local/bin/npm" "run" "deploy:twilio-cli"
18 verbose node v14.10.0
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error twilio-video-app-react@0.1.0 deploy:twilio-cli: `cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build`
22 error Exit status 1
23 error Failed at the twilio-video-app-react@0.1.0 deploy:twilio-cli script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
aaalaniz commented 4 years ago

hey @leepowers

What version of the plugin are you using?

Thanks!

leepowers commented 4 years ago

@aaalaniz

Version numbers of various Twilio plugins and code in use:

twilio-video-app-react@0.1.0 twilio-cli/2.9.0 darwin-x64 node-v14.10.0 @twilio-labs/plugin-rtc 0.4.0 @twilio-labs/plugin-serverless 1.8.0

timmydoza commented 4 years ago

Hey @leepowers!

I'm wondering if you can try running the command again, but with an extra -- in there. Like this:

npm run deploy:twilio-cli -- -l debug

The extra -- is needed to correctly pass the -l debug argument to the Twilio CLI.

Hopefully this will give us a useful error message.

aaalaniz commented 4 years ago

Hey @leepowers

We will close this issue for now. If are still having issues please reopen and we can help.

Thanks!