Heroku推送失败,远程被拒绝

时间:2019-01-05 02:05:16

标签: node.js reactjs heroku create-react-app

我收到此错误消息:

  

Heroku推送被拒绝,无法编译Node.js应用。 [远程拒绝]   主机->主机(预接收挂钩被拒绝)错误:推送失败   一些参考

package.json

{
    "name": "devconnector",
    "version": "1.0.0",
    "description": "Social network for developers",
    "engines": {
        "node": "8.11.4"
    },
    "main": "server.js",
    "scripts": {
        "client-install": "npm install --prefix client",
        "start": "node server.js",
        "server": "nodemon server.js",
    "client": "npm start --prefix client",
        "dev": "concurrently \"npm run server\" \"npm run client\"",
        "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
    },
    "author": "Cara Adelson",
    "license": "ISC",
    "dependencies": {
        "bcryptjs": "^2.4.3",
        "body-parser": "^1.18.3",
        "concurrently": "^4.1.0",
        "express": "^4.16.4",
        "gravatar": "^1.6.0",
        "jsonwebtoken": "^8.4.0",
        "mongoose": "^5.3.12",
        "passport": "^0.4.0",
        "passport-jwt": "^4.0.0",
        "validator": "^10.9.0"
      },
      "devDependencies": {
        "nodemon": "^1.18.6"
      }
}

1 个答案:

答案 0 :(得分:0)

将您的node_modules文件夹添加到.gitignoreThis page可能会对您有所帮助。