关于CNPM配置

老师非得让我们用CNPM,所以在下面记录下

安装CNPM的命令如下

npm install -g cnpm –registry=https://registry.npmmirror.com

安装的话直接

cnpm install

个人我非常不推荐这样子使用,我推荐使用修改registry方法来实现镜像

注意 如果报下面的错误:

npm error arg Argument starts with non-ascii dash, this is probably invalid: –registry=https://registry.npmmirror.com
npm error code ENOENT
npm error syscall open
npm error path C:\Users\q2019\–registry=https:\registry.npmmirror.com\package.json
npm error errno -4058
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'C:\Users\q2019\–registry=https:\registry.npmmirror.com\package.json'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: C:\Users\q2019\AppData\Local\npm-cache\_logs\2025-06-16T03_37_06_546Z-debug-0.log

请检查你复制的安装命令是否变成了

npm install express –registry=https://registry.npmmirror.com

检查registry前面的两个–是否编程了一个-

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇