显示错误节点版本的节点上的警告。它会导致sqlite3错误吗?

时间:2016-03-10 21:22:50

标签: node.js sqlite package.json

运行npm install时,我收到警告消息:

npm WARN engine module@0.0.1: wanted: {"node":">= 0.2.9 < 0.7.0"} (current: {"node":"0.12.2","npm":"2.7.4"})

但是在package.json中指定了节点5.3.0(请参见下文) 为什么当前版本为5.3时,消息告诉我版本0.12? 是不是sqlite3的错误?我收到了消息:

Error: Cannot find module '...\node-v47-win32-x64\node_sqlite3.node'
    at Function.Module._resolveFilename (module.js:326:15)

但实际上npm intall创建了node- v14 -win32-x64而不是node- v47 -win32-x64目录。

{
  "name": "aesku-hera",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "supervisor ./bin/www"
  },
  "engines": {
    "node": "5.3.0",
    "npm": "2.7.4"
  },
  "dependencies": {
    "body-parser": "^1.12.4",
    "connect-busboy": "0.0.2",
    "cookie-parser": "~1.3.5",
    "debug": "~2.2.0",
    "execsql": "0.0.3",
    "express": "~4.12.4",
    "gm": "^1.18.1",
    "jade": "^1.9.2",
    "jsonfile": "^2.2.3",
    "module": "0.0.1",
    "moment": "^2.10.3",
    "morgan": "~1.5.3",
    "multer": "0.1.6",
    "node-hl7": "^0.1.3",
    "node-json-db": "^0.6.3",
    "node-mv": "^0.1.3",
    "periodic-task": "^0.1.0",
    "pg": "^4.4.0",
    "request": "^2.58.0",
    "serve-favicon": "~2.2.1",
    "sqlite3": "^3.1.1",
    "string": "^3.3.0"
  }
}

1 个答案:

答案 0 :(得分:0)

package.json中的engines部分只是指示哪个引擎(如节点)以及您的代码可以使用的版本 - 有关详细信息,请参阅documentation

您本地安装的节点很可能是版本0.12。您应将其升级到5.3.0或更高版本,然后尝试重新安装软件包。

您可以使用命令

快速验证您的节点版本

node -v