当前位置:网站首页>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 所在目录下
最终是这样的:


边栏推荐
- MFC dialog program core -isdialogmessage function -msg message structure -getmessage function -dispatchmessage function
- QQ group was stolen, a large-scale social death scene caught off guard
- huffman编码
- C # realize the hierarchical traversal of binary tree
- 面试突击61:说一下MySQL事务隔离级别?
- asp.net 项目使用aspnet_compiler.exe发布
- Method area of JVM
- C # implements queue structure definition, incoming and outgoing operations
- Adjacency matrix and adjacency table structure of C # realization graph
- 【LeetCode】14、最长公共前缀
猜你喜欢

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

Matlab简单入门

How to calculate win/tai/loss in paired t-test

倍福PLC通过CANOpen通信控制伺服
![[leetcode] 14. Longest public prefix](/img/3b/3388ce8382ad5caaaf0a42488da2f9.png)
[leetcode] 14. Longest public prefix

Viewing splitchunks code segmentation from MPX resource construction optimization

推荐模型复现(三):召回模型YoutubeDNN、DSSM

Adjacency matrix and adjacency table structure of C # realization graph

C#实现图的邻接矩阵和邻接表结构

Blurred pictures become clear, one button two-color pictures, quickly organize local pictures These 8 online picture tools apply to join your favorites!
随机推荐
QQ集体被盗号,猝不及防的大型社死名场面
【综合案例】信用卡虚拟交易识别
Bison uses error loop records
Detailed explanation on configuration and commissioning of third-party servo of Beifu TwinCAT -- Taking Huichuan is620n as an example
Can software related inventions be patented in India?
C # implementation of binary tree non recursive middle order traversal program
MFC-对话框程序核心-IsDialogMessage函数-MSG 消息结构-GetMessage函数-DispatchMessage函数
Proteus Software beginner notes
If I am in Shenzhen, where can I open an account? In addition, is it safe to open an account online now?
C # implements queue structure definition, incoming and outgoing operations
C#线索二叉树的定义
Go Senior Engineer required course | I sincerely suggest you listen to it. Don't miss it~
C#通过中序遍历对二叉树进行线索化
nvtmpp
SCHIEDERWERK电源维修SMPS12/50 PFC3800解析
Testing -- automated testing: about the unittest framework
面试突击61:说一下MySQL事务隔离级别?
Mysql database master-slave synchronization, consistency solution
InDesign插件-常规功能开发-JS调试器打开和关闭-js脚本开发-ID插件
Set operator of gbase8s database in combined query