【问题标题】:Heroku cannot find module 'Sequelize'Heroku 找不到模块“续集”
【发布时间】:2017-05-20 18:25:08
【问题描述】:

当服务器在 index.js 文件上运行 npm start 时,我收到错误 heroku cannot find module 'Sequelize'。当我通过命令 heroku local 在本地运行它时,它工作正常。我不明白的是我的项目中没有名为“Sequelize”的模块。它被称为小写续集。这是我的 package.json

{
  "name": "anonbay",
  "version": "1.0.0",
  "description": "social network app",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "author": "saud",
  "license": "ISC",
  "dependencies": {
    "bcrypt-nodejs": "0.0.3",
    "body-parser": "^1.16.0",
    "express": "^4.14.0",
    "express-graphql": "^0.6.3",
    "express-session": "^1.15.3",
    "graphql": "^0.9.1",
    "graphql-subscriptions": "^0.3.1",
    "lodash": "^4.17.4",
    "mongoose": "^4.7.7",
    "pg": "^6.1.2",
    "pg-hstore": "^2.3.2",
    "sequelize": "^3.30.4",
    "subscriptions-transport-ws": "^0.6.0"
  }
}

【问题讨论】:

    标签: node.js heroku


    【解决方案1】:

    我的错误是我用大写字母导入“Sequelize”。它在本地工作,但似乎 heroku 区分大小写。将其更改为“续集”并且有效

    【讨论】:

      猜你喜欢
      • 2021-05-13
      • 1970-01-01
      • 1970-01-01
      • 2015-09-21
      • 2021-03-20
      • 2016-07-31
      • 2021-06-17
      • 2016-09-05
      相关资源
      最近更新 更多