npm config set registry https://registry.npm.taobao.org 设置淘宝源
npm install 再次运行 如果不成功 多运行几次 以下是报错信息
PS D:\TXT\vueT>npminstall -g cnpm --registry=https://registry.npm.taobao.org
npm ERR! syscall mkdirnpm ERR! errno -4048
npm ERR![Error: EPERM: operation not permitted, mkdir'C:\Program Files\nodejs\node_modules\cnpm']{npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\cnpm'npm ERR!}npm ERR!npm ERR! The operation was rejected by your operating system.
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JDX\AppData\Local\npm-cache\_logs\2021-09-26T15_14_42_117Z-debug.log