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路

相关推荐
IT界的老黄牛11 小时前
手机 Chrome 远程调试实战:adb + DevTools,localhost 就是你的测试服
chrome·测试工具·adb
HelloWorld工程师11 小时前
网站开启HTTPS:2步解决Chrome“不安全”提示
chrome·网络协议·https·ssl
Web打印12 小时前
HttpPrinter web打印控件 官方文档(https://wiki.httpprinter.com/)快速检索目录
java·javascript·chrome
嵌入式小站1 天前
STM32 零基础可移植教程 24:SPI Flash 读数据,先从指定地址读几个字节
chrome·stm32·嵌入式硬件
John_ToDebug1 天前
在 Windows 上搭建 Chromium 148 内核编译环境:一份实战笔记
chrome·经验分享·笔记
lzhdim1 天前
C盘空间多出来4GB:谷歌服软 Chrome本地AI大模型可禁用、删除了
前端·人工智能·chrome
喜欢踢足球的老罗2 天前
Chrome 扩展 MV3 终极指南:破解 Background Service Worker 的生命周期与 Token 管理困局
前端·chrome
喜欢踢足球的老罗2 天前
Chrome MV3 插件架构深度解析:Service Worker 生命周期与 Token 管理的三层博弈
前端·chrome·架构
一拳小和尚LXY2 天前
我开发了一款免费 Chrome 插件 TabScribe:一键复制所有标签页为 Markdown/JSON,完全离线零追踪
前端·chrome·json
dust_and_stars2 天前
ubuntu24上安装chrome和edge浏览器
前端·chrome·edge