Search code examples
node.jssails.jswaterline

Adapter is not compatible with the current version of Sails


I am not able to run sails js project on my UBUNTU machine i've sails 0.10.5 and the below is the error i am getting

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$ 

my package.json file is:

{
  "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": ""
}

i don't know what is happening and I've already burned penalty of hours doing R&D and fixing it

please help me get rid of this.

Sails and Node versions are:

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

Thanks


Solution

  • Your sails version is 0.10.5 but the sails-disk version specified in your package.json is "sails-disk": "~0.9.0",.

    You should update your sails-disk to the latest version. Here's how:

    In package.json:

    Change "sails-disk": "~0.9.0", to "sails-disk": "*",. Save the file.

    Now, run npm update --save.

    This will update your sails-disk (probably to "sails-disk": "~0.10.0",) and also set that version in package.json.

    Now try sails lift. Good luck !

    PS. You should do the same for sails as that version is also not in sync with the installed version.