我正在尝试在我的VS代码上安装Agora视频聊天模板,我已经将后端部署到Heroku,并从Agora下载源代码并将其安装在我的npm窗口上,当我运行命令npm start
时,它只安装后端目录而忽略前端,这是我得到的错误消息:
⌂ Main Menu ▼ install ┌──────────────────────────────────────────────────────────────┐ │ │√ Node >= 14.0 exists │ Description │√ Cleaned project directories │ Installs the codebase onto your local machine │| Downloading frontend │ │√ Downloading backend │ │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────────┘
C:UserslenovoDocumentscurrent projectagora-chat-appnode_modulesyoga-layout-prebuiltyoga-layoutbuildReleasenbind.js:53
throw ex;
^
Error: spawn npx ENOENT
at notFoundError (C:UserslenovoDocumentscurrent projectagora-chat-appnode_modulescross-spawnlibenoent.js:6:26)
at verifyENOENT (C:UserslenovoDocumentscurrent projectagora-chat-appnode_modulescross-spawnlibenoent.js:40:16)
at ChildProcess.cp.emit (C:UserslenovoDocumentscurrent projectagora-chat-appnode_modulescross-spawnlibenoent.js:27:25)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:UserslenovoDocumentscurrent projectagora-chat-appnode_modulescross-spawnlibenoent.js:30:37)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn npx',
path: 'npx',
spawnargs: [
'react-native',
'init',
'omarchat2022',
'--title',
'"Group video by Omar Allam"',
'--template',
'agora-appbuilder-core@2.0.2',
'--skip-install'
]
}
看起来像是Node.js错误,我建议将Node.js更新到LTS版本。