当前位置:网站首页>cnpm报错‘cnpm‘不是内部或外部命令,也不是可运行的程序或批处理文件
cnpm报错‘cnpm‘不是内部或外部命令,也不是可运行的程序或批处理文件
2022-06-29 12:10:00 【Henry_楠】
执行安装cnpm
npm install -g cnpm --registry=https://registry.npmmirror.com
安装完成后,执行 cnpm 报错:
'cnpm'不是内部或外部命令,也不是可运行的程序或批处理文件
该问题是由于 cnpm不在nodejs目录的文件夹下面
- 先执行下面查找nodejs目录所在:
where node
执行安装cnpm后回命令行会出现cnpm安装后的目录,例如:
C:\Users\admin\AppData\Roaming\npm\node_modules\cnpm\bin\cnpm
打开cnpm所在的目录,例如:C:\Users\admin\AppData\Roaming\npm\node_modules复制cnpm目录至nodejs目录下的\node_modules文件夹里,此时会发现和npm文件夹也在这个目录
打开
C:\Users\admin\AppData\Roaming\npm,将 cnpm 和 cnpm.cmd 移至 npm 和 npm.cmd 所在目录下
最终是这样的:


边栏推荐
猜你喜欢

倍福TwinCAT3 的OPC_UA通信测试案例

趣谈网络协议(二)传输层

Quick look | the long-awaited 2022 Guangzhou assistant testing engineer's real problem analysis is finally released

Uncover the practice of Baidu intelligent test in the field of automatic test execution

Blurred pictures become clear, one button two-color pictures, quickly organize local pictures These 8 online picture tools apply to join your favorites!

多项目开发入门-业务场景关联基础入门测试 工资表

Definition of C # clue binary tree

推荐模型复现(四):多任务模型ESMM、MMOE

中职网络安全技能竞赛之应用服务漏洞扫描与利用(SSH私钥泄露)

Interview shock 61: tell me about MySQL transaction isolation level?
随机推荐
Unexpected ‘debugger‘ statement no-debugger
在印度与软件相关的发明可不可以申请专利?
[leetcode] 14. Longest public prefix
Understanding of P value
Golang image/png processing image rotation writing
Cereal mall project
趣谈网络协议(二)传输层
倍福PLC通过CANOpen通信控制伺服
缓存一致性,删除缓存,写入缓存,缓存击穿,缓存穿透,缓存雪崩
Gbase8s database into external clause
Recommended model recurrence (I): familiar with torch rechub framework and use
面试突击61:说一下MySQL事务隔离级别?
Comment calculer Win / Tai / Loss in paired t - test
InDesign plug-in - general function development -js debugger open and close -js script development -id plug-in
C#通過中序遍曆對二叉樹進行線索化
从Mpx资源构建优化看splitChunks代码分割
C # indexe l'arbre binaire en traversant l'ordre moyen
记一次固态更新与系统迁移debug的过程
Interview shock 61: tell me about MySQL transaction isolation level?
[cloud native] 2.4 kubernetes core practice (middle)