Can't run Node Sails application (TypeError: Invalid Version: 0.18.04)


(Wiking) #1

When the application starts, the following error occurs.
But I cannot understand what version it may be about?
So is it about the version of what?
Please help!

$ node app.js
debug: `sails.config.express` is deprecated; use `sails.config.http` instead.
info: 
info:                .-..-.
info: 
info:    Sails              <|    .-..-.
info:    v0.12.13            |\
info:                       /|.\
info:                      / || \
info:                    ,'  |'  \
info:                 .-'.-==|/_--'
info:                 `--'-------' 
info:    __---___--___---___--___---___--___
info:  ____---___--___---___--___---___--___-__
info: 
info: Server lifted in `/var/www/place`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.

debug: -------------------------------------------------------
debug: :: Tue Aug 21 2018 20:54:04 GMT+0300 (MSK)

debug: Environment : development
debug: Port        : 1337
debug: -------------------------------------------------------
[ERROR] TypeError: Invalid Version: 0.18.04
    at new SemVer (/var/www/place/node_modules/semver/semver.js:293:11)
    at compare (/var/www/place/node_modules/semver/semver.js:566:10)
    at Function.gte (/var/www/place/node_modules/semver/semver.js:615:10)
    at Object.<anonymous> (/var/www/place/node_modules/db-migrate-pg/index.js:159:43)
    at /var/www/place/node_modules/continuation-local-storage/context.js:84:17
    at tryCatcher (/var/www/place/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/var/www/place/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/var/www/place/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/var/www/place/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/var/www/place/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/var/www/place/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/var/www/place/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/var/www/place/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)

(Lars Willighagen) #2

What are the dependencies in your package.json?


(Wiking) #3

I have two projects with the same error.

First package.json

{
  "name": "maps-backend",
  "private": true,
  "version": "0.0.0",
  "description": "a Sails application",
  "keywords": [],
  "dependencies": {
"bcrypt": "0.8.7",
"connect-redis": "3.1.0",
"continuation-local-storage": "3.2.0",
"csvtojson": "1.0.3",
"db-migrate": "0.10.0-beta.20",
"db-migrate-pg": "0.1.11",
"ejs": "2.3.4",
"express": "^4.14.0",
"grunt": "1.0.1",
"grunt-contrib-clean": "1.0.0",
"grunt-contrib-coffee": "1.0.0",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-cssmin": "1.0.1",
"grunt-contrib-jst": "1.0.0",
"grunt-contrib-less": "1.3.0",
"grunt-contrib-uglify": "1.0.1",
"grunt-contrib-watch": "1.0.0",
"grunt-sails-linker": "0.10.1",
"grunt-sync": "0.5.2",
"include-all": "1.0.0",
"md5": "^2.2.1",
"node-schedule": "^1.2.1",
"passport": "0.3.2",
"passport-local": "1.0.0",
"pg": "6.1.0",
"pg-hstore": "2.3.2",
"rc": "1.0.1",
"request": "^2.79.0",
"sails": "0.12.9",
"sails-disk": "0.10.9",
"sails-hook-flash": "0.2.1",
"sails-hook-sequelize": "1.0.1",
"sails-hook-sequelize-blueprints": "0.3.0",
"sails-postgresql": "0.11.4",
"sequelize": "3.25.0",
"sharp": "^0.17.1",
"togeojson": "^0.16.0",
"uuid": "3.0.1",
"xml2js": "^0.4.17"
  },
  "scripts": {
"debug": "node debug app.js",
"start": "node app.js"
  },
  "main": "app.js",
  "author": "",
  "license": ""
}

second 

    {
      "name": "common-resources",
      "private": true,
      "version": "0.0.0",
      "description": "a Sails application",
      "keywords": [],
      "dependencies": {
    "bcrypt": "0.8.7",
    "connect-redis": "3.1.0",
    "db-migrate": "0.10.0-beta.20",
    "db-migrate-pg": "0.1.11",
    "ejs": "2.3.4",
    "express": "^4.15.4",
    "grunt": "1.0.1",
    "grunt-contrib-clean": "1.0.0",
    "grunt-contrib-coffee": "1.0.0",
    "grunt-contrib-concat": "1.0.1",
    "grunt-contrib-copy": "1.0.0",
    "grunt-contrib-cssmin": "1.0.1",
    "grunt-contrib-jst": "1.0.0",
    "grunt-contrib-less": "1.3.0",
    "grunt-contrib-uglify": "1.0.1",
    "grunt-contrib-watch": "1.0.0",
    "grunt-sails-linker": "~0.10.1",
    "grunt-sync": "0.5.2",
    "include-all": "^1.0.0",
    "mkdirp": "^0.5.1",
    "pg": "6.1.0",
    "pg-hstore": "2.3.2",
    "rc": "1.0.1",
    "sails": "~0.12.11",
    "sails-disk": "~0.10.9",
    "sails-hook-flash": "0.2.1",
    "sails-hook-sequelize": "1.0.1",
    "sails-hook-sequelize-blueprints": "0.3.0",
    "sails-postgresql": "0.11.4",
    "sequelize": "3.25.0",
    "sharp": "^0.17.3",
    "uuid": "3.0.1"
      },
      "scripts": {
    "debug": "node debug app.js",
    "start": "node app.js"
      },
      "main": "app.js",
      "repository": {
    "type": "git",
    "url": "git://github.com/user/common-resources.git"

(Wiking) #4

Anybody can help me?


(Lars Willighagen) #5

I don’t think this is a problem with npm, as the package.json looks fine and I don’t think npm would be run in this case. In the only other occurrence of this warning I could find the problem is caused by the users package.json, but that doesn’t seem to be the case here. The only other thing I can think of is the local Sails package.json version somehow being wrong. Does removing node_modules/ and reinstalling Sails help? Otherwise maybe the people at Sails can help you along.


(system) #6

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.