StormChanger StormChanger - 5 months ago 33
Node.js Question

how to update/upgrade sails project with node js and all its dependency

I tried with 'npm update' and with 'ncu' and I got following warning and error as given below :

At Console :



npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log/package.json'

npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log-utils/package.json'


npm ERR! enoent ENOENT: no such file or directory, rename 'Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash' -> 'Proj_Dir/node_modules/grunt-contrib-less/node_modules/lodash'

npm ERR! enoent This is most likely not a problem with npm itself

npm ERR! enoent and is related to npm not being able to find a file.

npm ERR! Proj_Dir/npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log/package.json'

npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log-utils/package.json'



npm ERR! enoent ENOENT: no such file or directory, rename 'Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash' -> 'Proj_Dir/node_modules/grunt-contrib-less/node_modules/lodash'

npm ERR! Please include the following file with any support request:
npm ERR! Proj_Dir/npm-debug.log

npm-debug.log
-------------

37224 warn ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log/package.json'

37225 warn ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log-utils/package.json'

37226 verbose stack Error: ENOENT: no such file or directory, rename 'Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash' -> 'Proj_Dir/node_modules/grunt-contrib-less/node_modules/lodash'



37232 error path Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash

37236 error enoent ENOENT: no such file or directory, rename 'Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash' -> 'Proj_Dir/node_modules/grunt-contrib-less/node_modules/lodash'

Answer

Suppose you have sails version 0.11.0, run this command.

npm install sails@~0.12.0 --force --save

For More detail visit official site

Like most Node packages, Sails respects semantic versioning. For example if you are using Sails v0.11.3, and then upgrade to Sails v0.11.4, you shouldn't need to change your application code. This is called a patch release. On the other hand, if you upgrade from Sails v0.11.3 to v0.12.0, you can expect some breaking changes-- meaning that you will need to change your Sails app's code in order to use the new version.

Notes

Once Sails v1.0 is released, minor version bumps will aim to not cause breaking changes either-- e.g. upgrading from v1.1.0 to v1.2.0 should not force you to make changes to your code; whereas upgrading to v2.0.0 might.

If you are more than one minor version behind the latest and run into difficulties, consider updating your app one step at a time. The migration guides are written with a particular version diff in mind and as you probably are well aware, when in doubt, it's best to isolate as many variables as possible. For instance, if you are running Sails v0.9 and trying to upgrade to Sails v0.12 but having trouble, first upgrade to Sails v0.10, then v0.11, then v0.12.

Comments