Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

electron7 please! #975

Open
halohsu opened this issue Jan 25, 2020 · 8 comments
Open

electron7 please! #975

halohsu opened this issue Jan 25, 2020 · 8 comments

Comments

@halohsu
Copy link

halohsu commented Jan 25, 2020

Please support electron 7, thx

@zaherg
Copy link

zaherg commented Feb 8, 2020

What is the problem you are facing with v7? I have my application running on v7 with no problems

@zaherg
Copy link

zaherg commented Feb 9, 2020

@bluemiaomiao check this issue #855 also this comment if you are using node >11 #871 (comment)

@halohsu
Copy link
Author

halohsu commented Feb 9, 2020

I try to use the new version of electron to complete the automatic dark mode under macOS Catalina.
I have the following problems:

yarn run v1.21.1
warning package.json: License should be a valid SPDX license expression
$ node .electron-vue/dev-runner.js
/Users/key/Source/WebStormProjects/my-project/node_modules/electron/index.js:14
    throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
    ^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
    at getElectronPath (/Users/key/Source/WebStormProjects/my-project/node_modules/electron/index.js:14:11)
    at Object.<anonymous> (/Users/key/Source/WebStormProjects/my-project/node_modules/electron/index.js:18:18)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789: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:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/Users/key/Source/WebStormProjects/my-project/.electron-vue/dev-runner.js:4:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

My development environment is:

System: macOS Catalina, 10.15.3
Nodejs Version: v10.18.1
Electron: 7.1.0
Code Editor: VS Code Stable

And I also encountered this problem in version 8.0.0
Although this problem was finally solved by me, I hope to provide a selection list that can provide an electron version when executing the project creation command!!!
The mission of electron-vue is to simplify our work :)

@zaherg
Copy link

zaherg commented Feb 11, 2020

Are you sure you have made all the requirements for your code?
I am asking you because I have my application (not released it yet) running on Electron 8 and the current version (on my site) is running on Electron 7.

Screen_Shot_2020-02-11_at_11_30_06_AM

And both working fine with the automatic dark mode functionality.

System: macOS Catalina, 10.15.3
Nodejs Version: v13.5.0
Electron: 8.0.0

@halohsu
Copy link
Author

halohsu commented Feb 11, 2020

I think it's necessary for me to provide you with the steps to create my project.

vue init simulatedgreg/electron-vue demo
cd demo
yarn
yarn upgrade electron@8.0.0
yarn run dev

Then something went wrong with the project. I can't find the steps to change the electron version...

@zaherg
Copy link

zaherg commented Feb 11, 2020

This won't work with you as I told you before, you need to follow the steps in the issue #855 and this, in particular, is what I've done #855 (comment)

@halohsu
Copy link
Author

halohsu commented Feb 12, 2020

Can a version selection function be provided? As follows:

Which version of electron do you want to use?
-> Electron 2.0.0
-> Electron 6.0.0
-> Electron 8.0.0
-> Electron 7.0.0

I think it's a good suggestion!

@Zhwt
Copy link

Zhwt commented Feb 14, 2020

@bluemiaomiao In case you can use npm command, you can try the following:

  1. Delete node_modules/electron/ folder or rename it.
  2. Change electron's version number in package.json according to your spec (not necessary if you provided the version number in step 3).
  3. Run npm i electron in your project directory.

Not tested on 8.0.0 but I'm currently using 7.1.11 and these steps works for me :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants