简体   繁体   English

git push heroku master Remote failed

[英]git push heroku master Remote failed

This is my error image getting on heroku logs --tail这是我在 heroku 日志中获取的错误图像 --tail

above is a given image of my errors.以上是我的错误的给定图像。 When I am trying to deploy my nodejs app Getting error on git push Heroku master.当我尝试部署我的 nodejs 应用程序时,在 git 推送 Heroku master 时出现错误。 . . . . . . Remote failed working properly on local server.远程无法在本地服务器上正常工作。 I am beginner please help my git id is cosmos-dx and there is a git repo of name Webdictionary我是初学者,请帮助我的 git id 是 cosmos-dx 并且有一个名为 Webdictionary 的 git repo

After reading through the nodemon docs , and taking the fact that you stated you are new, I think I know what is happening.在阅读了nodemon docs并接受了你说你是新手的事实之后,我想我知道发生了什么。

In the nodemon docs it gives you two ways to install, one is globally npm install -g nodemon and the other is to install it in the dev dependencies npm install --save-dev nodemon .在 nodemon 文档中,它为您提供了两种安装方式,一种是全局npm install -g nodemon ,另一种是将其安装在开发依赖项中npm install --save-dev nodemon Either of these options would make nodemon not be present if the build to heroku uses npm install --only=production .如果构建到 heroku 使用npm install --only=production ,那么这些选项中的任何一个都会使 nodemon 不存在。 I assume they do that.我假设他们会那样做。

In your package.json file, change the npm start script to this:在您的 package.json 文件中,将npm start脚本更改为:

"start": "node ser1.js"

As nodemon is not present in the heroku built application, your current start script will fail.由于 heroku 构建的应用程序中不存在 nodemon,因此您当前的启动脚本将失败。 If you want to continue using nodemon for local development you can add a new script:如果你想继续使用 nodemon 进行本地开发,你可以添加一个新脚本:

"dev": "nodemon ser1.js"

From there to run your application, with nodemon, on your local machine you would run npm run dev从那里运行你的应用程序,使用 nodemon,在你的本地机器上你将运行npm run dev

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误-git push heroku master - Error - git push heroku master git push heroku master给我报错 - git push heroku master is giving me an error git push heroku master 与 node.js 部署挂起 - git push heroku master with node.js deploy hanging 运行“git push heroku master”时出现错误 - I get an error when running “git push heroku master” React应用程序Heroku构建失败-git push heroku master-预期X,第1行出现解析错误,输入意外结束。 哪个文件的第1行? - React app Heroku build failed - git push heroku master - Expecting X, Parse error on line 1: got unexpected end of input. Line 1 of which file? MERN 堆栈推送到 heroku:! [远程拒绝] master -> master(预接收钩拒绝) - MERN Stack push to heroku: ! [remote rejected] master -> master (pre-receive hook declined) 将更新后的 master 分支推送到位于同一项目文件夹中并在本地 git repo 中配置的远程存储库 - Push the updated master branch to remote repository which in in same project folder and configured in local git repo 挂在 git 上的 Express 应用程序构建推送到 Heroku - Express app build hanging on git push to Heroku Heroku 在尝试推送 React 应用程序时“未能推送一些参考” - Heroku “failed to push some refs” when trying to push React app ! [remote denied] master -> master (pre-receive hook denied) 尝试将mern应用部署到heroku时 - ! [remote rejected] master -> master (pre-receive hook declined) when trying to deploy mern app to heroku
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM