官术网_书友最值得收藏!

Setting up npm and Node.js

Before setting up npm and Node.js, let us understand these terminologies and how they help us in application development. Node.js is a JavaScript runtime environment built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. npm from Node.js is the package manager for JavaScript which helps in discovering the packages of reusable code and assembles them in powerful new ways. By using npm, you can install, share, and distribute your code easily and manage the project dependencies wisely. Node.js installation comes with npm and can be downloaded and installed from its home page.

We used the latest stable version available (v6.11.1 LTS) for the setup, as shown in the following steps:

  1. Download Node.js, installable from its home page (https://nodejs.org/en/).
  2. Run the installable, which starts up with the following interface:
  1. Click Next and accept the terms in the following interface: 
  1. Choose the installation directory. I am happy with the default directory provided and continue to the Next step, as follows:
  1. The next step gives us the Node.js runtime engine and npm package manager along with the documentation shortcuts and path entries. We can leave the default options selected and go to the Next step, which takes us to the final step:
  1. Click on the Install button, which should install Node.js, along with the npm package manager, on your computer:

Please be advised that neither the Node.js nor the npm have GUI. They are only accessible through the command line interface, hence you would need to run the commands on the command line.

  1. Once the installation is complete, you should see the success status as follows:
  1. Once the Node.js and npm installation is complete, you can open the command prompt and verify the installation and version using the commands shown in the following screenshot:
主站蜘蛛池模板: 莱州市| 醴陵市| 桂阳县| 余干县| 吉木萨尔县| 宁国市| 吴江市| 大理市| 云梦县| 边坝县| 吴江市| 邵阳县| 教育| 永修县| 红原县| 花莲市| 镶黄旗| 长沙市| 金阳县| 静海县| 穆棱市| 韶山市| 乐安县| 保康县| 刚察县| 黄陵县| 龙陵县| 云南省| 申扎县| SHOW| 定边县| 龙陵县| 崇阳县| 孟津县| 阳新县| 新乡市| 镇沅| 屯门区| 莱西市| 常德市| 游戏|