npm镜像仓库和安装问题

D:\ccswks\X6>npm install

npm ERR! code CERT_HAS_EXPIRED

npm ERR! errno CERT_HAS_EXPIRED

npm ERR! request to https://registry.npm.taobao.org/@babel%2Fcore failed, reason: certificate has expired

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\dream\AppData\Local\npm-cache\_logs\2024-07-18T01_45_09_035Z-debug.log

D:\ccswks\X6>npm config get registry

https://registry.npm.taobao.org/

D:\ccswks\X6>npm config list

; "user" config from C:\Users\dream\.npmrc

://registry.npmjs.org/ = ""

; registry = "https://registry.npmmirror.com/" ; overridden by project

; "project" config from D:\ccswks\X6\.npmrc

registry = "https://registry.npm.taobao.org/"

strict-peer-dependencies = false

; node bin location = C:\Programs\node-v16.0.0-win-x64\node.exe

; cwd = D:\ccswks\X6

; HOME = C:\Users\dream

; Run `npm config ls -l` to show all defaults.

仓库地址全局是对的,被这个项目的覆盖了。https://registry.npmmirror.com这个是对的。这个项目目录有.npmrc文件。修改这里地址就可以了。

安装报出错,下载不了包

npm install --legacy-peer-deps

D:\ccswks\X6>npm install

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR!

npm ERR! While resolving: x6@undefined

npm ERR! Found: stylelint@15.11.0

npm ERR! node_modules/stylelint

npm ERR! stylelint@"^15.10.1" from the root project

npm ERR!

npm ERR! Could not resolve dependency:

npm ERR! peer stylelint@">= 11.x < 15" from stylelint-config-prettier@9.0.5

npm ERR! node_modules/stylelint-config-prettier

npm ERR! stylelint-config-prettier@"^9.0.4" from the root project

npm ERR!

npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps

npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

npm ERR!

npm ERR! See C:\Users\dream\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\dream\AppData\Local\npm-cache\_logs\2024-07-18T01_54_01_502Z-debug.log

D:\ccswks\X6>npm view stylelint-config-prettier versions

[

'1.0.0', '1.0.1', '1.0.2',

'2.0.0', '2.1.0', '3.0.1',

'3.0.3', '3.0.4', '3.1.0',

'3.2.0', '3.3.0', '4.0.0',

'5.0.0', '5.1.0', '5.2.0',

'5.3.0', '6.0.0', '7.0.0',

'8.0.0', '8.0.1', '8.0.2',

'9.0.0', '9.0.1', '9.0.2',

'9.0.3', '9.0.4', '9.0.5'

]

npm view stylelint-config-prettier latest

npm i -g pnpm 全局安装之后还是找不到pnpm命令,手动增加path路

相关推荐
SimonLiu0097 小时前
[AI]30分钟用cursor开发一个chrome插件
chrome·ai·ai编程
守城小轩17 小时前
Chromium GN目标指南 - 查看GN目标(三)
chrome·chrome devtools·指纹浏览器·浏览器开发
守城小轩1 天前
Chromium CDP 开发(八):测试自定义的CDP指令
chrome·chrome devtools·指纹浏览器·浏览器开发
白云千载尽1 天前
ubuntu初始化与软件安装(持续更新)
linux·chrome·ubuntu
守城小轩1 天前
CEF127 编译指南 MacOS 篇 - 拉取 CEF 源码(五)
chrome·chrome devtools·指纹浏览器·浏览器开发
测试19981 天前
Chrome+Postman做接口测试
自动化测试·软件测试·chrome·测试工具·职场和发展·测试用例·postman
守城小轩2 天前
CEF127 编译指南 MacOS 篇 - 安装 depot_tools(四)
chrome·chrome devtools·指纹浏览器·浏览器开发
守城小轩2 天前
CEF127 编译指南 MacOS 篇 - 编译 CEF(六)
chrome·chrome devtools·指纹浏览器·浏览器开发
不会画画的画师2 天前
Google Chrome浏览器安装到其它盘的方法
chrome
AI小白龙2 天前
【bash】linux中打包某个可执行文件及其依赖文件
linux·chrome·bash