Node JS

NPM Demystified Part-3 : npm update and npm outdated commands explained in detail.

http://heatherbestel.com/tag/vitamins-for-the-soul/ Let’s update our index.js with following code snippet.

go to link var _ = require('lodash'); console.log(_.compact([0, 1, false, 2, '', 3]));

mujeres solteras guadalajara espa a Just comment the existing code, Let us go through the above two lines of code then we will revert back to our old code.

click Save the index.js and run “npm start”

http://fisflug.is/?yrus=oopzioni-digitali-siti-migliori&0a1=71 Output will be: [ 1, 2, 3 ]

handel opcje binarne opinie The compact method is part of lodash, It will remove the falsy value present in an Array i.e(null, false, 0, undefined, “”). Just, for example, we have used this method.

come fare ad assicurarsi che opzionibinarie funzioni Want to know more about methods available in lodash? refer this url : https://lodash.com/docs/

Scambia criptovalute, Forex e opzioni in Italia e Germania sulla piattaforma di trading pluripremiata http://nlst-usa.com/?trere=opzioni-binari-è-pericolosoption. Depositi con Visa e MasterCard ??Great!! Hereby we have managed to add external node module and able to access method present in that external module.

http://lokoli.com/?rtyt=site-de-rencontre-gratuit-avec-numero-de-telephone&a94=e7 npm outdated

dating a cancer lady Next, we will look into npm outdated command. To demonstrate this command I’m degrading the version of lodash. When we run npm outdated output will be.

npm outdated

Package Current Wanted Latest Location
lodash 4.13.0 4.13.0 4.17.4 nodeapp

We can find the outdated packages with this command.

☝☝Questions: How you reduced the version of lodash?
Updated the package.json such that

"dependencies": {
"lodash": "^4.17.3"
}

"dependencies": {
"lodash": "^4.13.0"
}

After modification just do npm install, npm will install the package version mentioned in the package.json. then try running npm outdated you will get above error.

npm update

In the above example, you can find the current version of lodash installed with our application is 4.13.0. You can check the version by the following command as well.

npm ls

You can find following output.
nodeapp@1.0.0
└── lodash@4.13.0

Now just run npm update, Since I have used ^ before version it will update my lodash package to a latest minor version which is 4.17.3.

npm update

nodeapp@1.0.0

└── lodash@4.17.4

if you have used * for version, it will update to latest major version.

In this post, we have learned the usage of external node module and we accessed methods available in that module. Then we learned three important npm commands.

npm outdated
npm ls
npm update

In the next chapter, we will go through remaining commands available with npm.

Please share your comments or questions in the below comment section!!???