{"componentChunkName":"component---src-pages-author-author-yaml-id-js","path":"/author/eric-chan/","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"id":"445a45cf-6c7b-5624-a656-db9212a29a67","html":"<h5 id=\"the-guide-to-npmwhat-is-this-and-why-should-i-care\" style=\"position:relative;\"><a href=\"#the-guide-to-npmwhat-is-this-and-why-should-i-care\" aria-label=\"the guide to npmwhat is this and why should i care permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 66.61538461538463%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAACi0lEQVQoz21Ra0/iQBTlJ/sH/KKJ2f3gtwUlsIqwkQ2sEIpSqUBBmBZKC0VogYJdICgqtrzk0efsoJvNZrOTk5vMnTn33JPjMFMpq9uF9/dQlv/A6nQsSfobtiSN6i2JFfrZbD+TWbdaZiDg0Ov1OYSqrk10fWoYE9OcWZYB/3NmED5CqCxX49lMg1DDYg6rUX+oVIQf4VYc66ZuJBzvEMQrw0zZ8oyvoqrmb9VSSWXLk0J+JQrbMaZpQ6hHIg6tVhPZskiSzXyuRVNNAJr520Yuy98k7zLpKkEImcyq31/I8rzbXT09IZplGFtyNOqY0BTXbJrogrZFsG20M6qoY9q2ZpqgSP9r4EMZkWccVySSI693FPAP3e5RIDA8PnqJRB5PT2Y0hX4WKWAYxmKx2GiabpiobNZr+EGe89VCKKQSyafvwSlNqSQ5vrpU06nR2Wk3eK5ZVhF56XQuYhhxEaJw7BKL3ZC5NyQfi22VC3hi4HJJu7tIbej19JxO+fBQ3t9vhcPPyjiXy+YAwHzH6W+elN+d8H6J+b+2n19gPO6Y0jQjiOr07fVFeciDR74+VucIyvRNXWpiuw0o0BsOS4lIP4staawaPeNyKcUwt8oTiqLu6hPNVnQbJYncLCFEWykbcwEhANSF/2S1WgIikbzG04k4cRWXaxzyrKGo1pUKJ4rVarUhigUAnE6X03Xk9ngYlm2IzWKxmCdTPM9fX+NYOHTu8ZJZkmOY3zkb77nbJooG9gaDNCjcMqUCW+4N+qhj2fb2FcK5rvmCwb3PnwT5p/Yep4ZhDgPHtfqdUeMtoTFnStNS6RUU5hyrUMAWBb1W2/A8lNpiNHK8sxPe34seHMB2a9NoGD7fL2uqkd5CAd8zAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"the guide to NPM\"\n        title=\"the guide to NPM\"\n        src=\"/static/b1b472805cf24bc9687a374f0e76cb83/e5715/the-guide-to-NPM.png\"\n        srcset=\"/static/b1b472805cf24bc9687a374f0e76cb83/a6d36/the-guide-to-NPM.png 650w,\n/static/b1b472805cf24bc9687a374f0e76cb83/e5715/the-guide-to-NPM.png 768w,\n/static/b1b472805cf24bc9687a374f0e76cb83/aa440/the-guide-to-NPM.png 1500w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span>What is This, and Why Should I Care?</h5>\n<p>NPM is a package manager for javascript. It is used to share and distribute code amongst the coding community. There are over half a million packages for free developed and shared to help your JavaScript development.</p>\n<p>To discover packages click <a href=\"http://www.npmjs.com\">here</a></p>\n<h5 id=\"how-do-i-install-npm\" style=\"position:relative;\"><a href=\"#how-do-i-install-npm\" aria-label=\"how do i install npm permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How Do I Install NPM?</h5>\n<p>NPM can easily be installed by going to the node.js website. Just click on the link to download an executable file which will install the package manager for you.</p>\n<p>(If you have brew on Mac or Chocolatey on Windows installed, it is even easier just run the command:</p>\n<p>[code]brew install npm[/code]</p>\n<p>Or</p>\n<p>[code]choco install nodejs[/code]</p>\n<h5 id=\"how-do-i-install-packages\" style=\"position:relative;\"><a href=\"#how-do-i-install-packages\" aria-label=\"how do i install packages permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How Do I Install Packages?</h5>\n<p>Head over here to search for your package. Once you’ve found it, type in your console:</p>\n<p>[code]npm install -g[/code]</p>\n<p>Since NPM packages are open-source, be wary that some of the packages may not be built correctly. A good way to tell would be viewing the top of the page for any errors.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 484px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 14.46280991735537%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAIAAAAcOLh5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAArElEQVQI14XL3QrBUAAA4D2zXFNulZ9SLrbCftBssRbtmE2ktjBtoyTWWrMzZ5HacmnDE/juP8xzveTxurohQrcoQgGEY3GyWRnpO83+wfoiDVxWsBlVVQAAi/mywxOsjW9jxYJre2fHRz1zNHSyTNPUDhfJiaXzU/eTX6ZlooVKlF8eCQLHcSzDk7MmcS/iYYEyGr12NxhWMrm2F0maoqqDaU4O8pJb1+A3fwA1PJJKGuHhOQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"image1\"\n        title=\"image1\"\n        src=\"/static/3e8083212f595a6fecdfdd039a9e9a46/ff42b/image1.png\"\n        srcset=\"/static/3e8083212f595a6fecdfdd039a9e9a46/ff42b/image1.png 484w\"\n        sizes=\"(max-width: 484px) 100vw, 484px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h5 id=\"how-do-i-keep-my-packages-up-to-date\" style=\"position:relative;\"><a href=\"#how-do-i-keep-my-packages-up-to-date\" aria-label=\"how do i keep my packages up to date permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How Do I Keep My Packages Up-To-Date?</h5>\n<p>To update the npm packages, simply run:</p>\n<p>[code]npm update -g[/code]</p>\n<p>This will update all your outdated packages to the latest.</p>\n<h5 id=\"some-recommended-packages\" style=\"position:relative;\"><a href=\"#some-recommended-packages\" aria-label=\"some recommended packages permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Some Recommended Packages</h5>\n<ul>\n<li><a href=\"https://www.npmjs.com/package/http-server\">Http-server</a></li>\n</ul>\n<p>Detail: Emulates a web-server for client-side testing</p>\n<hr>\n<ul>\n<li><a href=\"https://www.npmjs.com/package/restify\">Restify</a></li>\n</ul>\n<p>Detail: Assists in setting up a REST APIs to test on your local server</p>\n<hr>\n<ul>\n<li><a href=\"https://www.npmjs.com/package/mocha\">Mocha</a></li>\n</ul>\n<p>Detail: Unit testing for web-development. Very useful in testing “code coverage” (It tells you where your code is not being tested in a nice HTML file)</p>\n<hr>\n<ul>\n<li><a href=\"https://www.npmjs.com/package/loginradius-sdk\">LoginRadius-SDK</a></li>\n</ul>\n<p>Detail: For existing customers, simplifies calls to our server for easy customizability</p>\n<hr>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"title":"Node Package Manager (NPM)","author":{"id":"Eric Chan","github":null,"avatar":null},"date":"August 04, 2017","updated_date":null,"tags":["NodeJs","NPM"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/b1b472805cf24bc9687a374f0e76cb83/ee604/the-guide-to-NPM.png","srcSet":"/static/b1b472805cf24bc9687a374f0e76cb83/69585/the-guide-to-NPM.png 200w,\n/static/b1b472805cf24bc9687a374f0e76cb83/497c6/the-guide-to-NPM.png 400w,\n/static/b1b472805cf24bc9687a374f0e76cb83/ee604/the-guide-to-NPM.png 800w,\n/static/b1b472805cf24bc9687a374f0e76cb83/f3583/the-guide-to-NPM.png 1200w,\n/static/b1b472805cf24bc9687a374f0e76cb83/0dadc/the-guide-to-NPM.png 1500w","sizes":"(max-width: 800px) 100vw, 800px"}}}},"fields":{"authorId":"Eric Chan","slug":"/engineering/node-package-manager-npm/"}}}]},"authorYaml":{"id":"Eric Chan","bio":"Eric is a Software Engineer at LoginRadius. Born in Hong Kong he immigrated to Vancouver in order to pursue a degree focused in Computer Science at UBC. During his spare time, Eric enjoys playing sports recreationally, as well as developing fun projects! Check out his GitHub here.","github":null,"stackoverflow":null,"linkedin":null,"medium":null,"twitter":null,"avatar":null}},"pageContext":{"id":"Eric Chan","__params":{"id":"eric-chan"}}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}