Home > Article > Web Front-end > How to install nodejs in windows environment?
[Video tutorial recommendation: node js tutorial]
Node.js is a JavaScript running environment for Chrome V8 engine. Node.js uses an event-driven, non-blocking I/O model.
Node is a development platform that allows JavaScript to run on the server side. It makes JavaScript a scripting language on par with server-side languages such as PHP and Python.
Developed in 2009 by the master Ryan Dahl.
Essentially node.js is not a library, it is a running environment or a js language interpreter
Official website for nodejs download, as shown in the figure below, select the 32-bit or 64-bit installation package to download according to the Windows version.
You can go directly to next,
to determine the installation location selection, I usually install it in the D drive
..., and finally click finish
##2.3 Detect nodejs installationnode -v and
npm -v commands respectively to view the node version number and npm version number.
npm install..., the module will be installed by default ## under the path
C:\Users\username\AppData\Roaming #npm
and npm_cache
. No modifications are needed at this time, but it is convenient for managing the C drive data. At this time, we configure our customized global module installation path and cache path, and create two new folders in the current nodejs installation directory. They are node_global
node_cache` respectively.
At this time, you need to open win r and run, enter cmd to enter the command line interface, enter the following content to execute
npm config set perfix "D:\Program Files\nodejs\node_global" npm config set cache "D:\Program Files\nodejs\node_cache"
2.5 Configure environment variables
<pre class="brush:js;toolbar:false">NODE_PATH D:\Program Files\nodejs\node_global\node_modules</pre>
node_globalpath
D:\Program Files\nodejs\node_global
win r open and run cmd, executenpm install webpack -g
to install webpack, the following picture will appear and the configuration is completed .The following content will be displayed accordingly in the customized file
For more programming-related knowledge, please visit:
Programming Teaching! !
The above is the detailed content of How to install nodejs in windows environment?. For more information, please follow other related articles on the PHP Chinese website!