gpt4 book ai didi

node.js - 推送被拒绝,无法编译 Node.js 应用程序

转载 作者:太空宇宙 更新时间:2023-11-04 01:46:34 25 4
gpt4 key购买 nike

我有平均堆栈 Node js应用程序,我正在尝试将其部署到heroku,不幸的是我收到以下消息。

remote:        Installing any new modules (package.json)
remote: npm ERR! code EINVALIDTAGNAME
remote: npm ERR! Invalid tag name "^6.0.0.beta.1": Tags may not have any characters that encodeURIComponent encodes.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.3UQhB/_logs/2018-07-08T09_19_13_394Z-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: Some possible problems:
remote:
remote: - node_modules checked into source control
remote: https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
remote:
remote: - Node version not specified in package.json
remote: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
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 proexebookingapp.
remote:
To https://git.heroku.com/proexebookingapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/proexebookingapp.git'

C:\Users\Bonge\Documents\Projects\bookinga

pp>

这是我的 package.json 文件

{
"name": "movies-database",
"version": "1.0.0",
"description": "a simple movie database Rest API",
"main": "index.js",
"scripts": {
"dev": "nodemon server.js"
},
"keywords": [],
"author": "Geofrey Julius Zellah",
"license": "ISC",
"dependencies": {
"body-parser": "^1.18.3",
"bootstrap": "^3.3.7",
"connect-flash": "^0.1.1",
"cors": "^2.8.4",
"express": "^4.16.3",
"jquery": "^3.3.1",
"mongodb": "^2.2.33",
"mongoose": "^5.1.5",
"node-rest-client": "^3.1.0",
"nodemon": "^1.17.5",
"request": "^2.87.0",
"winston": "^3.0.0",
"primeng": "^6.0.0.beta.1",
"primeicons": "^1.0.0-beta.6"
}
}

我尝试了谷歌的不同方法,但没有任何帮助,也许有些人在heroku部署环境中知道这个问题,

请有人帮我解决这个问题吗?任何帮助建议将不胜感激。

最佳答案

^6.0.0.beta.1不是有效的语义版本,这是错误消息的内容。

semantic versioning spec州,

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92.

primeng旁边已经有一个合适的测试版,

"primeicons": "^1.0.0-beta.6"

应该是:

"primeng": "^6.0.0-beta.1",

关于node.js - 推送被拒绝,无法编译 Node.js 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51230600/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com