'cnpm' is not recognized as an internal or external command
'cnpm' is not recognized as an internal or external command
切换administrator账号cnpm不识别
解决:
npm install -g cnpm --registry=https://registry.npm.taobao.org
卸载nodejs,重新安装
注:@nuxt.js/cli找不到,删除node_modules重新cnpm i
错误提示
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: self signed certificate in certificate chain
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\clu\AppData\Roaming\npm-cache\_logs\2020-12-23T05_28_08_155Z-debug.log
安装成功
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
C:\Users\clu\AppData\Roaming\npm\cnpm -> C:\Users\clu\AppData\Roaming\npm\node_modules\cnpm\bin\cnpm
+ cnpm@6.1.1
added 689 packages from 972 contributors in 1368.413s
查看cnpm对应的registry
cnpm config get registry
https://registry.nlark.com/
'npm' is not recognized as internal or external command, operable program or batch file
Just add:
;C:\Program Files\nodejs\
To the end of your Path variable on the "User variable" section of the Environment Variables on the System Properties.
After that, reopen your command prompt and type
npm
This should work.
使用这个的前提是,先去官方下载安装包。
https://nodejs.org/en/download/
node-v14.17.5-x64.msi 安装之后,对应的路径下,就会有了
>npm version
{
npm: '6.14.14',
ares: '1.17.2',
brotli: '1.0.9',
cldr: '39.0',
icu: '69.1',
llhttp: '2.1.3',
modules: '83',
napi: '8',
nghttp2: '1.42.0',
node: '14.17.5',
openssl: '1.1.1k',
tz: '2021a',
unicode: '13.0',
uv: '1.41.0',
v8: '8.4.371.23-node.76',
zlib: '1.2.11'
}
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2019-12-23 onedrive忽略子文件夹
2019-12-23 git filter-repo
2015-12-23 Hosting Your Own NuGet Feeds
2015-12-23 NuGet学习笔记
2015-12-23 软件版本的处理