current position:Home>Node under window JS installation, environment configuration, setting Taobao image
Node under window JS installation, environment configuration, setting Taobao image
2022-05-15 02:15:51【Long, ya】
Window Next Node.js install 、 Environment configuration 、 Set Taobao image
One 、Node.js Installation
Chinese net :Node.js
About Node.js Installation , Environment configuration , In fact, there are many good articles on setting image source on the Internet , Here we combine our own operation , Make a summary record of your practice .
Click on All installation packages Of Alibaba cloud image , Here's the picture
If you need another version , Click on …/ Return to the parent folder . Here's the picture
Then you'll see from 0.1 Up to now, the installation directory of all versions , Pictured ( part )
Here I have chosen 10.19.0 Version of , The directory after clicking in is shown in the figure below . Directly find the suffix of the corresponding system digits as .msi
Format installation package (32 Biting x86,64 Biting x64), Then click download .
Here is the installation . The default path specified during installation is C:\Program Files
You can specify that node.js Installation path for . Then there is always next Until the installation is complete , Click... After installation finish Exit the installation interface .
Use node -v
and npm -v
test node Is the installation successful , If successful, the publication number will be printed , Here's the picture
Two 、Node.js Environment configuration
If you choose .msi
When installing the format , It will configure environment variables for you by default . If your installation path is E:\WebEnviroment\node
.name In the system environment variable path The path is automatically added .
meanwhile node.js Default management system npm The global path and cache path of the package are in C:\Users\ Here is your username \AppData\Roaming
Next . If you don't want to occupy C Disk space , Then we can configure new global path and cache path for him .
stay node.js New in the installation directory node_global and node_cache Two new folders
Alt+R Input cmd Open console , Run the following two instructions :
npm config set prefix "E:\WebEnviroment\node\node_global"
npm config set cache "E:\WebEnviroment\node\node_cache"
Detect the situation after setting . Input
npm config list
. At the red box in the figure below cache and prefix The value of has become the path value we set .The following is to set the environment variable . My computer - Right click - attribute - Advanced system setup - senior - environment variable
After entering the interface , First find User variables -Path, Here's the picture
Click edit ,( Note that if the previous value does not have a semicolon , Remember to add a semicolon first ) Add... At the endE:\WebEnviroment\node\node_global;
. Here's the pictureHere is System variables Editing . Click on newly build . A variable called NODE_PATH. Variable value is E:\WebEnviroment\node\node_global\node_modules
Here's the picture
The configuration of this environment variable is completed .
modify .npmrc
Modify the installationE:\WebEnviroment\node\node_modules\npm\npmrc
file , Change the default to ( newly added ):prefix=E:\WebEnviroment\node
, If you don't make this change , be npm Runningnpm ls -g
When , Still use the default path to find the installed global module ;test
To test whether it works . Install one directlyexpress
modular , thennode_global
Whether there will be anode_modules
, And include the... We installedexpress
modular .Input
npm install express -g
stay
E:\WebEnviroment\node\node_global\node_modules
There's one moreexpress
Folder , Prove that the module was installed successfully .
3、 ... and 、 Set up npm Mirror source for
There are many ways to set up a mirror source , Here are two kinds of :
1. adopt npm command
Input npm config set registry https://registry.npm.taobao.org
After modification, you can test through this
npm config get registry
2. Use nvm Switch source
npm isntall nrm -g
Global installation
After installation , Input nrm ls
View the current source . belt ==*== Indicates the currently used npm Source .
adopt nrm use taobao
To specify the image source to use :
adopt nrm test npm
To test speed :
Four 、 Install Taobao cnpm Mirror image ( Recommended installation )
In the case of domestic networks , It's better to use domestic image source , After all, the speed will be much faster .
Console input npm install -g cnpm --registry=https://registry.npm.taobao.org
Enter for installation .
Input cnpm -v
Check whether the information shown in the figure below is printed successfully
5、 ... and 、 install node-sass Get stuck
Generally used in installation npm install
install node-sass There will be installation failure , Stop there for a long time or pop up a failure prompt , Cause installation node_modules The folder is incomplete , In the use of gulp Unknown problems are likely to occur when building tools to package projects . It is recommended to delete it node_modules package , stay gulpfile.js
Re run in the folder Directory cnpm install
Installation . You can also set Taobao's sass Mirror source npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
, And then use npm install
Installation .
copyright notice
author[Long, ya],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/132/202205120524254780.html
The sidebar is recommended
- Vue Chapter 4 Ajax in Vue: cross domain problems and slot slots
- Online nginx does not support the bug record of error reporting in delete request
- Okhttp sets the public parameters and puts the JSON object into the @ body to request the configuration of the public parameters
- Fluent ignores authentication of HTTPS and WSS certificates
- Browser loading HTML page evokes the most complete strategy of APP in mobile phone
- HTTP status code 304 and Etag details
- Using angularjs for fuzzy dynamic search drop-down box content
- Seamless connection to Macao, Hengqin Island, which is beautiful beyond the sky, is on fire again
- JQuery framework
- Vue mouse down and move event
guess what you like
A simple Vue answer demo, single choice and multiple choice
Front end interview question: if the cell in the table is red, click it to turn into white; if it is white, click it to turn into red, and what is not clicked is white
Vue packaging folding panel plus animation effect
If the front-end does real-time data acquisition?
Ant vue3 table sorted by time
Vue local refresh iframe
Vue instruction authority
Vue iframe refresh remains on the original page
Vue realizes Gaode map API mask, positioning and weather
Comparison and implementation of bidirectional data binding between react and Vue
Random recommended
- React error report record
- Analysis of react life cycle function
- react demo1 TodoList
- Summary of the differences between state and props in react
- Difference between controlled components and uncontrolled components in react
- Node. JS use get Stream download file
- How does JavaScript copy arrays instead of references
- JavaScript calculates the number of days, hours, minutes and seconds between days
- JQuery get page address parameters
- JavaScript create Download
- node. JS traversal directory
- Tips for using JavaScript string split (how to keep the delimiter)
- Common CSS notes
- JavaScript usage Get the address of the regular function
- New generation node JS web development framework koa zero foundation entry learning notes
- JavaScript notes
- asp. Net core method for modifying HTML without rerun
- Summary of compatibility processing of H5 + Vue cli project in Safari browser
- Summary of amap scheme of Gaode map used in vue3 + TS project
- Summary of filter scheme used in JS code in Vue
- Build an electron project based on Vue from scratch
- In Vue project, solve the problem of verification conflict when eslint and prettier are used at the same time
- Vue3 + vuecli4 solve chunk vendors JS file is too large. Scheme summary
- Scheme summary of eslint check before vue3 + vite configuration project operation and eslint check before git submission
- Fatal authentication failed for 'httpxxxx Git 'solution
- Vue's solution to the compatibility of hevc encoded video in each end browser
- Record the solution to the error in obtaining the picture in springboot in Vue
- [Vue] detailed analysis of the life cycle function of Vue components
- [Vue] deeper understanding of user-defined attribute props
- [Vue] front end error: cannot read properties of undefined (reading 'split')
- [Vue] asynchronous problem of component value transfer -- the sub component gets the data slowly
- [Vue] Vue data changes, but the page is not updated in real time
- [element UI] use of form verification -- detailed explanation
- [Vue] use of slots - Review
- The influence on the fixed positioning element of the inner layer when the outer element has a fixed height and overflows and rolls
- Precautions
- Change detection strategy of angular component
- Angular service and @ injectable
- JS, HTML and CSS are not compatible and do not use common knowledge
- Properties to be known in angular @ component