I was trying to install firebase for my react native project with
npm install --save firebase 
but I got errors. What worked for me was
npm install firebase --save 
for whatever reason. why? what's the difference ?!
I was trying to install firebase for my react native project with
npm install --save firebase 
but I got errors. What worked for me was
npm install firebase --save 
for whatever reason. why? what's the difference ?!
 
    
     
    
    If you go and read the documentation of these flags, you find that they also put --save/--save-dev after the package names. e.g.:
npm install sax
npm install githubname/reponame
npm install @myorg/privatepackage
npm install node-tap --save-dev
npm install dtrace-provider --save-optional
npm install readable-stream --save-exact
npm install ansi-regex --save-bundle
Another example would be this answer to the question that asks what the --save flag is used for. The answer also uses --save after the package names are listed.
All I know is that that's just how npm works. Every single example of installation I've seen has that same method of installation: npm install <package-name> <flag>. The exception being the --global flag.
