请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

electron 7.0 启动不起来...找了几个方法 也不行 一直提示错误重新安装

cloud_md@0.1.0 ele F:\learn_code\cloud_md
electron .

F:\learn_code\cloud_md\node_modules\electron\index.js:14
throw new Error(‘Electron failed to install correctly, please delete node_modules/electron and try insta
lling again’)
^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (F:\learn_code\cloud_md\node_modules\electron\index.js:14:11)
at Object. (F:\learn_code\cloud_md\node_modules\electron\index.js:18:18)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (F:\learn_code\cloud_md\node_modules\electron\cli.js:3:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cloud_md@0.1.0 ele: electron .
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cloud_md@0.1.0 ele script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2019-10-28T15_12_20_289Z-debug.log

正在回答 回答被采纳积分+3

1回答

提问者 Pirate_CN 2019-10-28 23:33:54

- 启动electron 7.0的时候有一个坑,需要手动安装7.0的一把编译包`https://npm.taobao.org/mirrors/electron/7.0.0/`

- 添加到node_module/electron/dist,dist没有需要手动创建,再在node_modules/electron下创建path.txt文件 写入electron.exe 即可.

 我已经解决了 - -

0 回复 有任何疑惑可以回复我~
  • 张轩 #1
    谢谢同学 后续会补充一章 7.0.0 的升级问题
    回复 有任何疑惑可以回复我~ 2019-11-05 09:36:23
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信