在配置Vue环境时,在安装了nodejs之后,运行命令安装npm时出现:idealTree:npm: sill idealTree buildDeps错误。
原因一:是因为node的默认安装环境在国外,需要修改镜像地址。
采用taobao的镜像地址,进入cmd之后输入:npm config set registry https://registry.npm.taobao.org
如果依然慢,需将npm源切换到新的:registry.npmmirror.com
npm的命令
npm config set registry https://registry.npmmirror.com
yarn的命令
yarn config set registry https://registry.yarnpkg.com/
就可以安装成功
。