Ashraf Slamang
Ashraf Slamang

Reputation: 1013

SailsJS not updating

I haven't used sails in a long while and was about to start a new project but wanted to update my older 0.12.14 version to 1.0.2. I first tried doing

$ npm update -g

and then running

$ sails -v

This returned

0.12.14

Confused, I listed the npm global packages

$ npm list -g --depth=0

and this returned the list of global packages without sails.

I tried

$ npm uninstall sails -g

and when running

$ sails -v

or even

$ sails new test

it appeared to continue working. Checking the version in the package.json of the test project revealed that the old version was still alive and kicking. I'm out of ideas on how to update / uninstall sails.

Upvotes: 1

Views: 246

Answers (1)

johnabrams7
johnabrams7

Reputation: 399

To update Sails.JS, use npm install sails -g instead of npm update -g

If that isn't working, be sure to update to the latest npm & Node.JS:

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

then

sudo npm install sails -g

To manually download and install Node.JS: https://nodejs.org/en/

Upvotes: 2

Related Questions