Heroku在推送时给我webpack和node js错误

时间:2019-03-20 10:56:26

标签: node.js heroku

Heroku突然给我错误, 在相同的设置下,它可以正常工作约一个月,昨天,在编辑了项目中的一些次要内容并上传到git后,推送到heroku master时出现了错误:

Creating an optimized production build...
       Failed to compile.

       ./src/sections/welcome/welcome.css
       Error: Didn't get a result from child compiler


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ghvinieri@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ghvinieri@0.1.0 build 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:
npm ERR!     /tmp/npmcache.KO8no/_logs/2019-03-20T10_43_07_497Z-debug.log
-----> Change to Node.js build process 
       Heroku has begun executing the "build" script defined in package.json
       during Node.js builds.
       Read more: https://devcenter.heroku.com/changelog-items/1573
-----> Build failed

       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys

       Some possible problems:

       - Node version not specified in package.json
         https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version

       Love,
       Heroku

 !     Push rejected, failed to compile Node.js app.
 !     Push failed

我尝试将节点版本放入package.json中,删除package.json,node_modules包含在gitigonre中,甚至尝试从heroku master复制回购,其中包含现在可在heroku上运行的旧代码,然后对其进行编辑并上传;它仍然会给出错误,对我来说毫无意义。它现在可以在heroku上以相同的设置工作,但是当我进行较小的更改上传时会出现错误。有人可以帮我吗?我被困住了,查找了所有可能的解决方案,但它们都不起作用。

0 个答案:

没有答案