I want to mention two things for beginners out there like me.
Use npm init -y to skip all the questions in npm init
Some NPM package documentations don't explicitly mention to use --save flag in their npm install quickstart or install guide.
This had me confused at first. I wondered why won't they add a --save flag because if you upload your application it would break because of missing dependencies. The dev said it's up to you if you want to use their package as a dependency or a dev dependency. But obviously, the package they are offering should be saved as a core dependency (and so he modified the docs).
TLDR: Some documentation don't mention the --save or --save-dev flag in their installation. Don't be afraid to add either flags!
I'm a fan of Open Source and have a growing interest in serverless and edge computing. I'm not a big fan of spiders, but they're doing good work eating bugs. I also stream on Twitch.
Oh.. that's a neat addition. Last time I checked, it didn't save in my package.json. Maybe I have a lower version of npm. Thanks for this! Really useful!
I'm a fan of Open Source and have a growing interest in serverless and edge computing. I'm not a big fan of spiders, but they're doing good work eating bugs. I also stream on Twitch.
I want to mention two things for beginners out there like me.
npm init -y
to skip all the questions in npm init--save
flag in theirnpm install
quickstart or install guide. This had me confused at first. I wondered why won't they add a--save
flag because if you upload your application it would break because of missing dependencies. The dev said it's up to you if you want to use their package as a dependency or a dev dependency. But obviously, the package they are offering should be saved as a core dependency (and so he modified the docs).TLDR: Some documentation don't mention the
--save
or--save-dev
flag in their installation. Don't be afraid to add either flags!Also npm version 5 saves the package in package.json by default, If you don’t want to save, you can override the default saving with --no-save
I think like package-lock.json, this was another nice feature of yarn they implemented.
Oh.. that's a neat addition. Last time I checked, it didn't save in my package.json. Maybe I have a lower version of npm. Thanks for this! Really useful!
Maybe you were using an npm version lower than 5