【问题标题】:npm WARN notsup Unsupported engine for sequelize@6.1.0: wanted: {"node":">=10.0.0"}npm WARN notsup sequelize@6.1.0 不支持的引擎:想要:{"node":">=10.0.0"}
【发布时间】:2020-08-07 11:59:02
【问题描述】:
{
  "name": "express",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon app.js"
  },
  "author": "Pratik Ahirrao",
  "license": "ISC",
  "devDependencies": {
    "nodemon": "^2.0.4"
  },
  "dependencies": {
    "body-parser": "^1.19.0",
    "ejs": "^3.1.3",
    "express": "^4.17.1",
    "express-handlebars": "^3.0.2",
    "mysql2": "^2.1.0",
    "pug": "^3.0.0"
  }
}

我想在我的 nodejs 应用程序中安装 sequelize。

我收到此错误:-

npm install --save sequelize
npm WARN notsup Unsupported engine for sequelize@6.1.0: wanted: {"node":">=10.0.0"} (current: {"node":"8.10.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: sequelize@6.1.0
npm WARN notsup Unsupported engine for semver@7.3.2: wanted: {"node":">=10"} (current: {"node":"8.10.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: semver@7.3.2
npm WARN notsup Unsupported engine for sequelize-pool@6.0.0: wanted: {"node":">= 10.0.0"} (current: {"node":"8.10.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: sequelize-pool@6.0.0

npm ERR! Unexpected end of JSON input while parsing near '...4e5abc2adff5fa18def",'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pratik/.npm/_logs/2020-06-24T08_25_07_274Z-debug.log

我该怎么办?

【问题讨论】:

    标签: node.js npm sequelize.js


    【解决方案1】:

    我已经解决了我的问题。 我的 node(8.10.0) 不兼容安装 sequelize。 所以我将它升级到最新版本。 以下是使用n 将节点升级到最新版本的命令:-

    sudo npm cache clean -f
    sudo npm install -g n
    sudo n latest
    

    【讨论】:

    • 非常糟糕。从不sudo npm
    • @Zach 为什么不用 sudo?他们正在尝试更新系统全局 (-g) 节点引擎。
    猜你喜欢
    • 2022-09-23
    • 2017-03-06
    • 1970-01-01
    • 2018-04-23
    • 1970-01-01
    • 2022-07-28
    • 1970-01-01
    • 2018-08-23
    • 1970-01-01
    相关资源
    最近更新 更多