ERROR in Template execution failed: ReferenceError: process is not defined(使用electron-vue出现的错误)
//进行命令之前,先换成淘宝的源npm config set registry https://registry.npm.taobao.orgvue init simulatedgreg/electron-vue my-projectcd my-projectnpm installnpm run devnpm install过程中,还有个坑(顺利安装的可以忽略此步)报错:el...
·
//进行命令之前,先换成淘宝的源
npm config set registry https://registry.npm.taobao.org
vue init simulatedgreg/electron-vue my-project
cd my-project
npm install
npm run dev
npm install过程中,还有个坑(顺利安装的可以忽略此步)
报错:electron@2.0.18 postinstall: `node install.js`
解决方法:在npmrc文件(这个文件在你nodejs的安装目录里,我的在这里E:\solf_down\node\node_modules\npm\npmrc)中添加,完美解决
electron_mirror="https://npm.taobao.org/mirrors/electron/"
当你用electron-vue创建好项目后,npm run dev运行时,报错
解决方法:直接在index.ejs中把下图的红框的代码去除掉,就行了。没有什么影响
也可以在https://github.com/SimulatedGREG/electron-vue/issues/871 看看其他解决方法
成功运行!
更多推荐
已为社区贡献2条内容
所有评论(0)