Sunday, 7 May 2017

Inconsistent behavior npm

I'm using npm install with advanced range, e.g. npm i karma@^1.0.0 and for Linux and OSX I get the latest version of package, but for windows platform, npm ignores range (caret symbol) and installs v.1.0.0

According to npm docs, I have to enclose version range with quotes. So, this npm i karma@"^1.0.0" works on windows properly.

Note that most version ranges must be put in quotes so that your shell will treat it as a single argument.

But why does it affect only windows? What might be the cause of this inconsistency?

npm - v.4.0.5

node - v.7.4.0

Thanks.



via Bob

No comments:

Post a Comment