Thomas Hastings

SailsJS Error on Install: npm ERR! enoent ENOENT

March 18, 2017

Error: npm ERR! enoent ENOENT: no such file or directory while installing module sails

If I run 'sails new app' everything installs fine. If I go into the new app cd app and run npm install it runs fine. If I wipe out the 'node_modules' directory and run npm install I get errors:

npm ERR! enoent ENOENT: no such file or directory, chmod '/node_modules/sails/node_modules/anchor/node_modules/geojsonhint/node_modules/jsonlint-lines/node_modules/nomnom/node_modules/chalk/node_modules/strip-ansi/cli.js'

Temporary Fix Until Pull Request Gets Merged or Version 1.0 is Released

Inside of the sails application go to the 'package.json' and replace:
"sails": "~0.12.13", with:
"sails": "github:lifespent/sails#hastings-fix",

And then run:
rm -rf node_modules
npm cache clean
npm install

Pull Request

I've opened a pull request with the anchor project on GitHub. I had to add the 'geojsonhint' dependency back into the package.json.