npmjs官网(查询依赖包)
2024-06-07可以方便的查看依赖包的安装、使用说明及相关注意事项等。_npm 依赖查询
npm i报错quest to https://registry.npmjs.org/xxx failed,reason: connect ETIMEDOUT 104.16.25.34:443
2024-06-06访问https://registry.npmjs.org需要翻墙才能访问,所以国内经常会出现连接超时等问题。将npm的源设置为国内的镜像,例如淘宝镜像。//尝试重新执行,应该就能够成功安装了。_: connect etimedout 104.16.25.34:443
npm install 提示错误FetchError: request to https://registry.npmjs.org/* failed,reason: connect ETIMEDOUT
2024-06-02npm install 时,会提示错误:FetchError: request to https://registry.npmjs.org/@types/uglify-js failed, reason: connect ETIMEDOUT 104.16.19.35:443。这是由于访问国内访问npm的资源库地址:https://registry.npmjs.org连接超时导致。设置完成之后,重新执行npm即可。
2024npm国内镜像源
2024-05-25华为云 NPM 镜像:https://mirrors.huaweicloud.com/repository/npm/腾讯云 NPM 镜像:https://mirrors.cloud.tencent.com/npm/清华大学开源镜像站:https://mirrors.tuna.tsinghua.edu.cn/npm 官方原始镜像网址是:https://registry.npmjs.org/网易 NPM 镜像:https://mirrors.163.com/npm/_npm 国内镜像
npm的镜像源
2024-05-12淘宝源:由淘宝团队提供的镜像源,地址是https://registry.npm.taobao.org/,是国内服务器,因此速度较快。官方源:npm官方提供的默认源,地址是https://registry.npmjs.org/,但由于位于国外,速度较慢。cnpm源:另一个由淘宝团队提供的镜像源,地址是http://r.cnpmjs.org/,同样是国内服务器,速度较快。阿里源:由阿里巴巴提供的镜像源,地址是https://npm.aliyun.com/,同样是国内服务器,速度较快。_npm镜像
npm 镜像源切换与设置
2024-05-10npm镜像源是指npm软件包管理器的服务器地址,用于下载和安装npm包。可以看到默认情况下是官方默认全局镜像 https://registry.npmjs.org/可以看到当前所用的镜像是 https://registry.npmjs.org。切换淘宝镜像之后总算能够安装下来。依赖安装中断或响应特别慢。删除淘宝镜像,恢复默认镜像。_npm镜像源配置
npm下载慢、淘宝镜像源无效问题:npm ERR! code FETCH_ERRO、Rinvalid json response body at https://registry.npmjs.org
2024-04-29npm下载慢、淘宝镜像源无效问题:npm install webpack -gnpm ERR! code FETCH_ERROR、invalid json response body at https//在使用npm命令的下载其他东西时候,很慢,卡很久。而且下载的淘宝源也没有生效.查看了npm的下载源发现还是npm官方的,npm源在国外,下载就很慢。没有切换成淘宝源的。所以这里要下载淘宝源并确保当前的源切换成了淘宝源了。_npm err! code fetch_error npm err! errno fetch_error npm err! invalid json r
前端自动生成接口ts代码
2024-04-23umijs : https://www.npmjs.com/package/@umijs/openapi拿到后端swagger文档的地址在 package.json 的 script 中添加 api: “openapi”: “ts-node openapi.config.ts”,生成api执行之后会生成包含了后端所有接口的请求、实体类类型的ts文件不过因为他是基于umi框架的,使用的是他们封装的axios,我们需要手动修改成自己封装的axio_@umijs/openapi
npm run dev报错:vue版本和vue-template-compiler版本不一致,导致无法启动
2024-04-21首先package.json文件中指定的vue版本为2.6.10,vue-template-compiler版本为2.6.10,使用的是华为npm仓库:https://repo.huaweicloud.com/repository/npm/为什么npm拉取的版本不是2.6.10,是因为vue版本采用了-开头(拉取仓库最新2.0版),vue-template-compiler版本是^开头(拉取仓库中最新的版本)官方地址:https://www.npmjs.com/方法:访问仓库中某个依赖版本。_vue-template-compiler@2.7.16
npm的镜像地址源
2024-04-206. 华为云镜像:https://mirrors.huaweicloud.com/repository/npm/5. 中国科技大学镜像:https://mirrors.ustc.edu.cn/npm/2. 淘宝镜像:https://registry.npm.taobao.org/1. 官方镜像:https://registry.npmjs.org/4. 阿里云镜像:https://npm.aliyun.com/7. 七牛云镜像:https://npm.qiniu.com/b.添加registry地址。_npm 地址