无法启动 twilio 项目
Posted
技术标签:
【中文标题】无法启动 twilio 项目【英文标题】:Unable to start twilio project 【发布时间】:2022-01-12 17:30:56 【问题描述】:我有一个 twilio flex 插件项目。我通常以npm start
开始项目,它在我的package.json
文件中别名为UNBUNDLED_REACT=true twilio flex:plugins:start
。但是,今天当我运行npm start
时,我收到以下错误:
» Could not get credentials for profile "my_email@my_work.com".
» To reconfigure the profile, run: twilio profiles:create`
Also logged to the console is a message that gives me a path to a log file. Within that log file I see the following content:
`0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/14.11.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v14.11.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle twilio-flex-agent-dashboard@0.0.2~prestart: twilio-flex-agent-dashboard@0.0.2
6 info lifecycle twilio-flex-agent-dashboard@0.0.2~start: twilio-flex-agent-dashboard@0.0.2
7 verbose lifecycle twilio-flex-agent-dashboard@0.0.2~start: unsafe-perm in lifecycle true
8 verbose lifecycle twilio-flex-agent-dashboard@0.0.2~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/my_user/Desktop/twilio-flex-agent-dashboard/node_modules/.bin:/Users/my_user/kafka-stuff/bin:/usr/local/opt/postgresql@9.6/bin:/bin:/usr/bin:/usr/local/bin:/usr/sbin
9 verbose lifecycle twilio-flex-agent-dashboard@0.0.2~start: CWD: /Users/my_user/Desktop/twilio-flex-agent-dashboard
10 silly lifecycle twilio-flex-agent-dashboard@0.0.2~start: Args: [ '-c', 'UNBUNDLED_REACT=true twilio flex:plugins:start' ]
11 silly lifecycle twilio-flex-agent-dashboard@0.0.2~start: Returned: code: 1 signal: null
12 info lifecycle twilio-flex-agent-dashboard@0.0.2~start: Failed to exec start script
13 verbose stack Error: twilio-flex-agent-dashboard@0.0.2 start: `UNBUNDLED_REACT=true twilio flex:plugins:start`
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-flex-agent-dashboard@0.0.2
15 verbose cwd /Users/my_user/Desktop/twilio-flex-agent-dashboard
16 verbose Darwin 20.5.0
17 verbose argv "/usr/local/Cellar/node/14.11.0/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v14.11.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error twilio-flex-agent-dashboard@0.0.2 start: `UNBUNDLED_REACT=true twilio flex:plugins:start`
22 error Exit status 1
23 error Failed at the twilio-flex-agent-dashboard@0.0.2 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
当我按照原始错误消息的提示执行操作时(即运行twilio profiles:create
,我收到一条成功消息。但是,我仍然无法启动该项目。
所以我的问题是,我的系统发生了什么事,现在我遇到了这个错误,我该如何解决它,以便我可以像以前一样使用npm start
开始我的项目?
【问题讨论】:
【参考方案1】:好的,问题已经解决了,我的问题是我在运行twilio profiles:create
时输入了我认为正确的用户名,但实际上是错误的用户名。输入正确的用户名已解决此问题。
【讨论】:
以上是关于无法启动 twilio 项目的主要内容,如果未能解决你的问题,请参考以下文章