[英]How to solve Node and reactapp error when deploying to heroku?
我正在尝试部署我的节点并对 web 应用程序做出反应。 我已经完成了部署的所有步骤。 但是当我运行这个命令时, git push heroku main
。 一切顺利到这里
,并且所有依赖项都已安装,然后发生错误,
remote: > NPM_CONFIG_PRODUCTION=false npm install --prefix frontend && npm
run build --prefix frontend
remote:
remote: npm ERR! code EBADPLATFORM
remote: npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
remote: npm ERR! notsup Valid OS: darwin
remote: npm ERR! notsup Valid Arch: any
remote: npm ERR! notsup Actual OS: linux
remote: npm ERR! notsup Actual Arch: x64
问题是我的package.json
文件中甚至没有fsevents
。 而且错误还清楚地表明 fsevents 在操作系统中需要 linux 但问题是在哪里编辑它
有什么帮助吗?
首先查看npm版本
$节点-v >> v16.2.0
$ npm -v >> 7.13.0
然后检查您的服务器 package.json 内部引擎更新相同版本这样
如果不再使用,也删除 fsevent
并再次提交并推动我希望它有帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.