Heroku找不到模块'Sequelize'

时间:2017-05-20 09:44:01

标签: node.js heroku

当服务器在index.js文件上运行npm start时,我收到错误heroku无法找到模块'Sequelize'。当我通过命令heroku本地在本地运行它它工作正常。我不明白的是我的项目中没有名为“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"
  }
}

1 个答案:

答案 0 :(得分:2)

我很糟糕,我正在导入' Sequelize'用大写。它在本地工作,但似乎heroku区分大小写。将其更改为' sequelize'它工作了