Nodejs 命令 install -g cnpm

问题遇到的现象和发生背景

Node js 问题
使用命令install -g cnpm --registry=https://registry.npm.taobao.org/
出现如下图所示的错误

用代码块功能插入代码,请勿粘贴截图

报错内容
npm ERR! code EINVAL
npm ERR! path C:\Users\27628\“D:\Program
npm ERR! Illegal characters in path.

npm ERR! Log files were not written due to an error writing to the directory: C:\Users\27628\“D:\Program_logs
npm ERR! You can rerun the command with --loglevel=verbose to see the logs in your terminal

img

原镜像地址已更换(官网说明),试试这个:

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

换一个镜像试一试