1、Electron 开发环境的安装
1、安装nodejs
node --version #查看node的版本
如果没有安装就是百度或(待续一篇安装)
npm config ls #查看node安装及配置路径
显示如下:
C:Usersxrl>npm config ls ; cli configs metrics-registry = "https://registry.npmjs.org/" scope = "" user-agent = "npm/6.12.1 node/v12.13.1 win32 x64" ; userconfig C:Usersxrl.npmrc cache = "D:\SoftWare\nodejs\node_cache" prefix = "D:\SoftWare\nodejs\node_global" ; builtin config undefined ; node bin location = D:SoftWare odejs ode.exe ; cwd = C:Usersxrl ; HOME = C:Usersxrl ; "npm config ls -l" to show all defaults.
为了保留C盘的剩余空间,有必要,把 npm的 global 路径修改到其他盘符下
npm config set cache "D:SoftWare odejs ode_cache" npm config set prefix "D:SoftWare odejs ode_global"
2、安装Electron
npm install -g cnpm -registry=https://registry.npm.taobao.org #安装cnpm