0

I'm trying to install karma using the following command npm i karma@^1.0.0. npm installs karma@1.0.0 rather than latest version karma@1.6.0. After a little investigation, I figured out that these commands work: npm i karma@^1 and npm i karma@^"1.0.0" (enclose command with double quotes). Anyone can explain how it should work?

I guess that this is not related to karma since it's reproducible with any package.

npm - 4.0.5, node - 7.4.0

Thanks.

Bob
  • 773
  • 1
  • 10
  • 20

1 Answers1

1

It's mentioned in the docs:

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

And the example given there follows the advice:

npm install sax@">=0.1.0 <0.2.0"
raina77ow
  • 103,633
  • 15
  • 192
  • 229