While installing grunt, one of the errors is unmet dependency semver@4
i am using [email protected]
, [email protected]
i run two commands and it shows two versions and one is invalid
npm list -g
and in the tree it shows [email protected] invalid
now i run
npm view semver version
now it shows 4.1.0
i tried npm update semver but nothing happens
i have even tried to the solution provided in similar question npm error invalid semver
curl https://npmjs.org/install.sh | sh
but donesnt help
I am new to npm and grunt please help!
what do you mean by
While installing grunt
? Installing the grunt-cli tools or the grunt-runner in your project?since 4.0 grunt is split into 2 modules:
grunt-cli needs to be installed globally, and only 1 time:
grunt needs to be installed locally in every project where you want to use grunt and grunt-plugins:
updating npm:
the crazy stuff about npm is, that you can even update npm via npm:
the current npm version is 2.1.9, so maybe this solves your problem.
hint: use nvm vor node.js version management. this solves multiple problems: