适配器与当前版本的 Sails 不兼容

Adapter is not compatible with the current version of Sails

我无法在我的 UBUNTU 机器上 运行 航行 js 项目我已经航行 0.10.5 以下是我得到的错误

ahsan@ahsan-Inspiron-N5110:~/Desktop/CardCashP2/Website$ sails lift 

info: Starting app...

warn: `sails.config.express` is deprecated; use `sails.config.http` instead.
warn: The adapter `sails-disk` appears to be designed for an earlier version of Sails.
warn: (it has a `registerCollection()` method.)
warn: Since you're running Sails v0.10.x, it probably isn't going to work.
warn: To attempt to install the updated version of this adapter, run:
warn: npm install sails-disk@0.10.x
error: There was an error attempting to require("sails-disk")
error: Is this a valid Sails/Waterline adapter?  The following error was encountered ::
error: Adapter is not compatible with the current version of Sails.
ahsan@ahsan-Inspiron-N5110:~/Desktop/CardCashP2/Website$ 

我的 package.json 文件是:

{
  "name": "",
  "private": true,
  "version": "0.0.0",
  "description": "a Sails application",
  "dependencies": {
    "MD5": "1.2.1",
    "autocomplete": "0.0.1",
    "convert-json": "^0.4.0",
    "cron": "^1.0.5",
    "download": "^0.1.18",
    "ejs": "0.8.4",
    "emailjs": "^0.3.8",
    "express": "^4.9.8",
    "grunt": "0.4.1",
    "ipv6": "^3.1.1",
    "js-combinatorics": "^0.4.0",
    "mkdirp": "^0.5.0",
    "moment": "^2.9.0",
    "mysql": "2.2.0",
    "nodemailer": "0.6.3",
    "optimist": "0.3.4",
    "pagination": "^0.4.3",
    "payment-paypal-payflowpro": "0.0.4",
    "paynode": "^0.3.6",
    "paypal-rest-sdk": "^1.0.0",
    "pdfkit": "0.6.2",
    "request": "2.34.0",
    "request-json": "0.4.10",
    "sails": "0.9.13",
    "sails-disk": "~0.9.0",
    "sequelize": "1.7.3",
    "wkhtmltopdf": "^0.1.4",
    "xlsjs": "^0.7.1"
  },
  "scripts": {
    "start": "node app.js",
    "debug": "node debug app.js"
  },
  "main": "app.js",
  "repository": "",
  "author": "",
  "license": ""
}

我不知道发生了什么,我已经花了很多时间进行研发和修复

请帮我摆脱这个。

Sails 和 Node 版本是:

ahsan@ahsan-Inspiron-N5110:~/Desktop/CardCashP2/Website$ sails --version
0.10.5
ahsan@ahsan-Inspiron-N5110:~/Desktop/CardCashP2/Website$ node --version
v0.10.35

谢谢

你的 sails 版本是 0.10.5 但你的 package.json 中指定的 sails-disk 版本是 "sails-disk": "~0.9.0",.

您应该将 sails-disk 更新到最新版本。方法如下:

package.json中:

"sails-disk": "~0.9.0", 更改为 "sails-disk": "*",。保存文件。

现在,运行 npm update --save.

这将更新您的 sails-disk(可能更新到 "sails-disk": "~0.10.0",)并在 package.json 中设置该版本。

现在尝试 sails lift。祝你好运!

PS。您应该对 sails 执行相同的操作,因为该版本也与安装的版本不同步。

更新sails-disk版本

对于 Sails 1 版本,"sails-disk":“^1.0.1”有效。

npm remove --save sails-disk npm install --save sails-disk