Heroku:Unable to Resolve续集

owfi6suc  于 2023-11-19  发布在  其他
关注(0)|答案(1)|浏览(110)

我尝试将旧项目重新部署到Heroku,并在推送后遇到错误:Unable to resolve sequelize package in /app,然后运行命令heroku run npx sequelize-cli db:migrate
FWIW,自从我上次没有问题地部署它以来,我在大约1年内没有对repo进行任何更改。我最近在package.json中添加了engines来解决推送错误,但这是唯一的更改。
我也没有/app目录在这个仓库,所以我不确定这是从哪里来的。
我的包。json:

{
  "name": "backend",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "sequelize": "sequelize",
    "sequelize-cli": "sequelize-cli",
    "start": "per-env",
    "start:development": "nodemon -r dotenv/config ./bin/www",
    "start:production": "node ./bin/www"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "bcryptjs": "^2.4.3",
    "cookie-parser": "^1.4.5",
    "cors": "^2.8.5",
    "csurf": "^1.11.0",
    "dotenv": "^10.0.0",
    "express": "^4.17.1",
    "express-async-handler": "^1.2.0",
    "express-validator": "^6.13.0",
    "faker": "^5.5.3",
    "helmet": "^4.6.0",
    "jsonwebtoken": "^8.5.1",
    "morgan": "^1.10.0",
    "per-env": "^1.0.2",
    "pg": "^8.7.1",
    "sequelize": "^5.22.4",
    "sequelize-cli": "^5.5.1"
  },
  "engines": {
    "node": "12.22.3"
  },
  "devDependencies": {
    "dotenv-cli": "^4.1.0",
    "nodemon": "^2.0.14"
  }
}

字符串

jgovgodb

jgovgodb1#

已通过运行heroku run npm run sequelize-cli db:migrate修复此问题

相关问题