標籤:lob vue2 nvm ted user tty enc 連接埠 oba
1.nvm,nodejs版本管理工具,可以自由切換nodejs版本
https://github.com/coreybutler/nvm-windows/releases
在這裡下載安裝。
使用命令:
nvm ls 查看所有可用nodejs版本
nvm use x.x.x 使用x.x.x版本
nvm install x.x.x安裝x.x.x版本
2.nrm,nodejs源切換工具,可以自由切換nodejs下載源
npm install nrm -g 全域安裝nrm
nrm ls 查看可用的npm源
nrm test 測試每個源的速度,可以選擇數值最小的源使用,國內一般是cnpm
nrm use xx 使用xx源
3.nodejs升級、重裝等出現Cannot find module ‘xxx‘,假設目前使用者名Lenovo,找到C:\Users\Lenovo\AppData\Roaming下的npm、npm-cache檔案夾刪除,重新安裝即可。
4.常用命令:
npm -v 查看npm版本
npm install xxx -g 全域安裝xxx模組
npm list --depth=0 -global 查看全域安裝的模組列表
npm install xxx --save 安裝xxx模組並放到package.json 的dependencies,作為生產依賴
npm install --save-dev 安裝xxx模組並放到package.json 的devDependencies,作為開發依賴
5.vue2腳手架提示:Error: listen EADDRINUSE :::8080,這是8080連接埠被佔用了,解決方案:
netstat -aon|findstr "8080" 找出哪個進程佔用了8080連接埠
taskkill /pid xxx -F 殺死這個pid為xxx的進程
nodejs提示