Heroku部署显示react软件包丢失

时间:2020-08-19 00:39:26

标签: node.js reactjs heroku react-fullstack

我正在关注这些视频,以便在heroku上部署mern应用。

https://www.youtube.com/watch?v=R54neaLznFA&list=PLillGF-RfqbbiTGgA77tGO426V3hRF9iE&index=3

我到达了git push heroku master的部分。那时我出错了。

remote: npm ERR! path /tmp/build_f5d00e83/client/package.json
remote: npm ERR! code ENOENT
remote: npm ERR! errno -2
remote: npm ERR! syscall open
remote: npm ERR! enoent ENOENT: no such file or directory, open '/tmp/build_f5d00e83/client/package.json'
remote: npm ERR! enoent This is related to npm not being able to find a file.
remote: npm ERR! enoent
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR!     /tmp/npmcache.CCgcp/_logs/2020-08-19T00_28_58_494Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 254
remote: npm ERR! mern-shopping-list@1.0.0 heroku-postbuild: `NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client`
remote: npm ERR! Exit status 254
remote: npm ERR!
remote: npm ERR! Failed at the mern-shopping-list@1.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR!     /tmp/npmcache.CCgcp/_logs/2020-08-19T00_28_58_514Z-debug.log
remote: 
remote: -----> Build failed
remote:        
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote:        If you're stuck, please submit a ticket so we can help:
remote:        https://help.heroku.com/
remote:
remote:        Love,
remote:        Heroku
remote:
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !       Push rejected to mysterious-mesa-00533.
remote:
To https://git.heroku.com/mysterious-mesa-00533.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/mysterious-mesa-00533.git'

由于如视频中所述,我在客户端文件夹中添加了反应代码,然后在服务器中添加了节点代码。我也尝试将代码推送到github中,但客户端文件夹无法进入。相反,您在文件夹图标上看到一个箭头。我有什么可以做的吗?

0 个答案:

没有答案
相关问题