简体   繁体   English

推送时的有效 url heroku 部署问题

[英]Valid-url heroku deployment issue on push

I'm getting the error valid-url not accessible from @heroku-cli/plugin-buildpacks when I try to push code to heroku using the CLI or through GitHub.当我尝试使用 CLI 或通过 GitHub 将代码推送到 heroku 时,我收到错误有效 URL 无法从 @heroku-cli/plugin-buildpacks 访问。

I've tried everything I could find on the internet including stack exchange to solve this problem, so I would really appreciate some help here.我已经尝试了我在互联网上可以找到的所有东西,包括堆栈交换来解决这个问题,所以我非常感谢这里的一些帮助。

I've done everything in the following link but am still experiencing the same issue: https://www.reddit.com/r/webdev/comments/m0vs4l/deploy_from_github_to_heroku_what_does_validurl/我已经完成了以下链接中的所有操作,但仍然遇到同样的问题: https://www.reddit.com/r/webdev/comments/m0vs4l/deploy_from_github_to_heroku_what_does_validurl/

My package.json is as follows我的package.json如下

    {
  "name": "backend",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node server.js",
    "dev": "nodemon server.js",
    "prodd": "NODE_ENV=production node server.js"
  },
  "engines": {
    "node": "14.x"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@heroku/buildpack-registry": "^1.0.1",
    "aws-sdk": "^2.874.0",
    "axios": "^0.21.1",
    "bcrypt": "^5.0.1",
    "bcryptjs": "^2.4.3",
    "cookie-parser": "^1.4.5",
    "cors": "^2.8.5",
    "cron": "^1.8.2",
    "crypto": "^1.0.1",
    "crypto-js": "^4.0.0",
    "dotenv": "^8.2.0",
    "express": "^4.17.1",
    "express-mongo-sanitize": "^2.0.2",
    "express-rate-limit": "^5.2.6",
    "google-auth-library": "^7.0.4",
    "helmet": "^4.4.1",
    "heroku": "^7.60.2",
    "html-to-text": "^7.0.0",
    "http-proxy-middleware": "^1.2.0",
    "jsonwebtoken": "^8.5.1",
    "mjml": "^4.9.0",
    "moment": "^2.29.1",
    "moment-timezone": "^0.5.33",
    "mongoose": "^5.12.1",
    "multer": "^1.4.2",
    "multer-s3": "^2.9.0",
    "nodemailer": "^6.5.0",
    "nodemon": "^2.0.7",
    "pug": "^3.0.2",
    "redis": "^3.1.0",
    "request": "^2.88.2",
    "select": "^1.1.2",
    "sharp": "^0.28.3",
    "twilio": "^3.59.0",
    "util": "^0.12.3",
    "validator": "^13.5.2",
    "xss-clean": "^0.1.1"
  }
}

My global installations are as follows.我的全局安装如下。 全局变量

I would really appreciate some help on this.我真的很感激这方面的一些帮助。 It's pushing to GitHub and working locally fine so it just seems to be something with the web pack它正在推动 GitHub 并在本地正常工作,所以它似乎与 web 包有关

I've deployed this same app and others to heroku multiple times in the past but am on a new computer now.我过去曾多次将相同的应用程序和其他应用程序部署到 heroku,但现在我在新计算机上。 Perhaps this has something to do with the issue?也许这与问题有关?

I hadn't specified the npm version in my package.json in the engines section.我没有在引擎部分的package.json中指定 npm 版本。 I specified it to the same npm version I was running locally and it all worked.我将它指定为我在本地运行的相同 npm 版本,并且一切正常。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM