运行"Amplify publish"时的"spawn npm.cmd ENOENT"



我有一个带有Amplify配置的简单React应用程序。当我尝试使用Amplify(Mac(发布它时,它以以下错误结束:

❯ amplify publish
✔ Successfully pulled backend environment dev from the cloud.
Current Environment: dev
| Category | Resource name                | Operation | Provider plugin   |
| -------- | ---------------------------- | --------- | ----------------- |
| Api      | sls-demo-twitter-state-api-2 | No Change |                   |
| Hosting  | amplifyhosting               | No Change | awscloudformation |
No changes detected
Publish started for amplifyhosting
command execution terminated with error
An error occurred during the publish operation: spawn npm.cmd ENOENT

同样的配置在我的其他客户端(Windows(上运行时没有任何问题。事实上,Amplify试图首先构建应用程序,但这一步并不奏效。我找不到这样做的理由。

"放大发布";基本上运行build&从放大项目配置启动命令,可以使用amplify configure project重新配置。

我希望在你的机器(Mac(npm is missing

安装节点brew install node并运行amplify publish

最新更新