1. Installation of node in the underlying environment
Node website: https://nodejs.org
NPM doesn’t need to be installed by itself; Node comes with NPM
Enter Node-v and NPM-V in CMD to see the versions of Node and NPM
2. Configure node’s environment variables
If you install node using the default installation address, you do not need to configure the environment variable
. If you change the default address when installing node, you will need to configure the environment variable
My installation address is the NodeJS file on disk F
“F:\nodejs\node_global”
NPM config set “F:\nodejs\node_global”
NPM config set cache “F:\nodejs\node_cache”
“F:\nodejs\node_cache”
Next, configure the environment variable
and create a new variable in the system variable
variable name: NODE_PATH
variable value: F:\nodejs\node_global\node_modules create a new variable in the path of the system variable enter
%NODE_PATH% open path in the user variable create a new variable F:\nodejs\node_global
if there are other variable statements in the path related to node or NPM, especially under C, If new files are generated in the node_cache and node_global folders, then the node environment is configured successfully
3. Install global WebPack
The NPM install webpack-g statement we just used to test node’s environment variables is the global installation statement for webpack, so we have already installed the global webpack
. Since I reported almost every error I could when installing webpack, just in case, let’s install it again!
Then we install
in CMD to execute NPM install — global webpack using the installation statement provided on wabpack’s official website
Since it is installed in NPM, so the installation speed is a little slow, the left ellipsis is the progress bar, we try to install in a good network environment, otherwise it will get stuck to your despair
Once installed, execute Webpack-V in CMD if the version number appears to indicate a successful installation.
Read More:
- Error: global variable is ambiguous (conflict between using namespace STD and global variable)
- Global variable error: unboundlocalerror: local variable ‘l’ referenced before assignment
- JMeter installation and configuration environment variables
- Bug001: error in gradle configuration environment variable: ERROR:JAVA_ Home is set to an invalid directory!
- Set path environment variable through cmd
- Maven global configuration
- Python global variables and global keywords
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad
- Error: No such keg: /usr/local/Cellar/node&install nvm&brew installation&Oh my zsh.git installation&git set alias&No bundle URL prese
- ERROR: The environment variable VG_GNU_PACKAGE must be set. Aborting.
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- Jenkins appears error: error cloning remote repo ‘origin solution (set global tool configuration)
- Simple solution for node sass installation failure
- Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit
- Error: EPERM: operation not permitted, mkdir ‘D:\nodejs\node_modules\npm\node_cache\_npx‘
- Solution to node sass installation failure
- Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtim
- Mobile app development: installation and configuration of react native
- Unloading and installation of node and NPM of Vue Foundation
- Start gzip in node environment of project optimization