ERROR in Template execution failed: ReferenceError: process is not defined(使用electron-vue出现的错误) - Go语言中文社区

ERROR in Template execution failed: ReferenceError: process is not defined(使用electron-vue出现的错误)


//进行命令之前,先换成淘宝的源
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_downnodenode_modulesnpmnpmrc)中添加,完美解决

electron_mirror="https://npm.taobao.org/mirrors/electron/"

 

当你用electron-vue创建好项目后,npm run dev运行时,报错

解决方法:直接在index.ejs中把下图的红框的代码去除掉,就行了。没有什么影响

也可以在https://github.com/SimulatedGREG/electron-vue/issues/871 看看其他解决方法

成功运行! 

 

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/sinat_19594515/article/details/103694805
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2021-04-08 10:02:31
  • 阅读 ( 1455 )
  • 分类:前端

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢