vue使用过程中遇到的一些问题
采用taobao的镜像地址,进入cmd之后输入
下面展示一些。
npm config set registry https://registry.npm.taobao.org
查看是否安装成功
npm config get registry
然后可以执行
npm install
修改npm包和缓存的安装位置
// 设置全局模块的安装路径
npm config set prefix "D:\nvm\node_global"
// 设置缓存到node_cache文件夹
npm config set cache "D:\nvm\node_cache"
// 还要把node_global路径加入到系统环境变量path中,方便直接使用命令行运行
查看包的安装位置:
npm root -g
Error: error:0308010C:digital envelope routines::unsupported
"serve_t": "set NODE_OPTIONS=\"--openssl-legacy-provider\" & npm run serve\n"
npm run serve_t
如果不可以,执行下面代码,苹果电脑
export NODE_OPTIONS=--openssl-legacy-provider