# 本地源使用方式——yarn
# 清空原来的环境设置
下面步骤 2 选 1
- 使用下面命令清空
# yarn yarn cache clean yarn config delete proxy # npm npm cache clean --force
- 或者重新安装 nodejs yarn
配置环境变量(必须重启机器才生效!)
- 检查 yarn node 是否安装
# python (必须重启机器才生效!)
82.44 上复制环境
\192.168.82.44\MapGIS 10 开发环境\WebClient\env 安装 python2
记得一定要把python的path添加到系统环境中
, 在安装的时候可以勾选,安装后也可以主动添加到环境变量中![]()
![]()
使用自己的热点 切记
# 设置本地源方式
内网是
http://192.168.11.130:4873/
# yarn
yarn config set registry http://192.168.11.130:4873/
# npm
npm set registry http://192.168.11.130:4873
使用公司的 WIFI 或者继续沿用自己的热点
# 安装 node-sass 依赖示例
yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
yarn global add node-sass@4.11.0 sass-loader@10.1.1
# windows环境
# 安装Visual C++ 环境
安装Windows C++环境 Visual Studio Tools (opens new window) 或者 Visual Studio Community (opens new window) (选择"Desktop development with C++")
npm上设置msvs的版本为下载的版本
npm config set msvs_version 2015
- 常见错误
node-sass@4.12.0
下依赖的node-gyp只支持2015及以下版本
的visual studio 库。
若版本不一致会报Inability to find msbuild, Visual Studio, or VC compiler
、MSB4019
相关错误,可以通过以上步骤安装要求版本的库
或者更新node-sass
版本解决问题。
# 安装windows-build-tool
参考链接安装windows编译环境 windows-build-tools (opens new window)。
npm install --global windows-build-tools
或者
yarn global add windows-build-tools