npm的常见问题及配置

运行npm install遇到问题:

No matching version found for ts-transformer-properties-rename@~0.14.0

运行 npm search ts-transformer-properties-rename 也报错404

应该就是配置镜像的问题,之前用的是淘宝镜像,需要删除该镜像

1、恢复默认镜像地址 删除会恢复默认镜像
npm config delete registry

npm缓存问题。需要清空缓存再安装依赖

npm cache clean -f

2、获取配置镜像地址
npm get registry

npm config get registry

3、全局配置淘宝镜像地址, 如果需要恢复淘宝镜像,可以这样
npm config set registry https://registry.npm.taobao.org --global

 npm config set registry https://registry.npmmirror.com --global

再次运行npm install就正常了

posted @   study_php_java_C++  阅读(98)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2019-03-22 禁止网站显示文件目录列表的方法(htaccess)
点击右上角即可分享
微信分享提示