gpt4 book ai didi

成功部署后,Heroku 构建失败

转载 作者:行者123 更新时间:2023-12-04 08:55:44 26 4
gpt4 key购买 nike

我定期部署到 Heroku,过去一切正常。然后,仅更改一行代码并将其推送到 Heroku 后失败。
我没有更新或安装任何东西。这种行为对我来说似乎太奇怪了。

\-----> Node.js app detected

-----> Creating runtime environment

NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false

-----> Installing binaries
engines.node (package.json): 12.18.1
engines.npm (package.json): unspecified (use default)

Resolving node version 12.18.1...
Downloading and installing node 12.18.1...
Using default npm version: 6.14.5

-----> Restoring cache
- node_modules

-----> Installing dependencies
Installing node modules

> fsevents@1.2.9 install /tmp/build_afdd9f79/node_modules/fsevents
> node install

npm ERR! Cannot read property 'length' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.Lt04X/_logs/2020-09-10T20_50_40_685Z-debug.log
-----> Build failed

We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys

If you're stuck, please submit a ticket so we can help:
https://help.heroku.com/

Love,
Heroku

! Push rejected, failed to compile Node.js app.
! Push failed
package.json 如下:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"build": "npm run production",
"postinstall": "npm run prod",
"heroku-postbuild": "npm run prod"
},
"devDependencies": {
"axios": "^0.19.2",
"bootstrap": "^4.5.0",
"browser-sync": "^2.26.7",
"browser-sync-webpack-plugin": "^2.2.2",
"cross-env": "^5.1",
"jquery": "^3.5.1",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.13",
"popper.js": "^1.16.1",
"resolve-url-loader": "^2.3.1",
"sass": "^1.26.9",
"sass-loader": "7.*",
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11"
},
"dependencies": {
"@chenfengyuan/vue-number-input": "^1.2.1",
"country-list": "^2.2.0",
"moment": "^2.27.0",
"vue-cool-lightbox": "^2.5.1",
"vue-loading-overlay": "^3.3.2",
"vue-moment": "^4.1.0",
"vue-recaptcha": "^1.3.0",
"vue-resource": "^1.5.1",
"vue-router": "^3.3.4",
"vue-select": "^3.10.3",
"vue-stripe-elements-plus": "^0.3.2",
"vuex": "^3.4.0"
},
"engines": {
"node": "12.18.1"
}
}
这可能是什么原因?

最佳答案

虽然严格来说不是问题的解决方案,但我能够通过将我的项目迁移到 Yarn 来克服这个错误。

关于成功部署后,Heroku 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63843800/

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