当前位置:网站首页>nvm安装node后,在使用npm指令时候显示不是内部或外部指令
nvm安装node后,在使用npm指令时候显示不是内部或外部指令
2022-06-30 11:27:00 【七月星辰】
问题回放
前段时间重装了电脑系统,重新下载了nvm来管理node版本,当时下载的时候可能没有注意,今天用npm的时候就报错npm不是内部或外部指令。
思来想去百度了看看,说是环境变量的问题,我安装nvm的时候改的D盘,我检查看安装时候就自动配好了,我都没手动改过环境变量。
在终端输入node -v
回车,哎神奇的是可以显示node版本号
输入npm -v
就显示不是内部或外部命令了。
然后我就重新卸载了我原来的node版本,再重新下的时候,哎,罪魁祸首就被我逮到了,看下图。
node版本是下载好了的,显示了complete
,但是明显下载npm的时候就报错了,我第一时间都想起应该就是我没给nvm设置镜像地址的原因了。
解决方案
以管理员身份运行cmd,在cmd窗口分别输入以下命令回车:
nvm node_mirror https://npm.taobao.org/mirrors/node/
nvm npm_mirror https://npm.taobao.org/mirrors/npm/
然后你再用nvm安装node就可以啦。也没有显示报错了。
都可以查看node版本和npm版本:
好啦,最后文章有些内容来源于此文章。
希望对你们有所帮助。
边栏推荐
- The latest collection of arouter problems
- 据说用了这个,老板连夜把测试开了
- "War" caused by a bottle of water
- 深入解析 Apache BookKeeper 系列:第四篇—背压
- AMS source code analysis
- 1175. 质数排列
- 重新理解oauth2.0协议进行联合登录
- CVPR 2022 | greatly reduce the manual annotation required for zero sample learning. Mapu and Beiyou proposed category semantic embedding rich in visual information
- 8 lines of code to achieve quick sorting, easy to understand illustrations!
- The operation and maintenance security gateway (Fortress machine) of Qiming star group once again won the first place!
猜你喜欢
Multiparty Cardinality Testing for Threshold Private Set-2021:解读
60 divine vs Code plug-ins!!
How to analyze native crash through GDB
Esp32-c3 introductory tutorial question ⑨ - core 0 panic 'ed (load access fault) Exception was unhandled. vfprintf. c:1528
Summer vacation study record
"New digital technology" completed tens of millions of yuan of a + round financing and built an integrated intelligent database cloud management platform
Dameng data rushes to the scientific innovation board, or becomes the "first share of domestic database" in the A-share market
Object mapping - mapping Mapster
Is the golden cycle of domestic databases coming?
“新数科技”完成数千万元A+轮融资,造一体化智能数据库云管理平台
随机推荐
阿里云李飞飞:中国云数据库在很多主流技术创新上已经领先国外
It is said that with this, the boss opened the test overnight
wallys/600VX – 2×2 MIMO 802.11ac Mini PCIe Wi-Fi Module, Dual Band, 2,4GHz / 5GHz QCA 9880
Retest the cloud native database performance: polardb is still the strongest, while tdsql-c and gaussdb have little change
Wechat Emoji is written into the judgment, and every Emoji you send may become evidence in court
导致系统性能失败的10个原因
Oracle NetSuite 助力 TCM Bio,洞悉数据变化,让业务发展更灵活
对象映射 - Mapping.Mapster
相对位置编码Transformer的一个理论缺陷与对策
Using cookie technology to realize historical browsing records and control the number of displays
Understanding society at the age of 14 - reading notes on "happiness at work"
wallys/IPQ8074a/2x(4×4 or 8×8) 11AX MU-MIMO DUAL CONCURRENT EMBEDDEDBOARD
R语言查看版本 R包查看版本
60 个神级 VS Code 插件!!
H3C switch emptying configuration
Uncover the whole link communication process of customer service im
TypeScript ReadonlyArray(只读数组类型) 详细介绍
100 important knowledge points that SQL must master: insert data
科普达人丨漫画图解什么是eRDMA?
Qt嵌入子Qt程序窗口到当前程序