Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify an Electron version when initializing a new project #246

Closed
sarabsandhu opened this issue Jun 7, 2017 · 10 comments
Closed

Specify an Electron version when initializing a new project #246

sarabsandhu opened this issue Jun 7, 2017 · 10 comments

Comments

@sarabsandhu
Copy link

I am wondering if I can specify version of electron-prebuilt-compile when initializing new project with electron-forge init. It automatically uses version 1.6.11 which has chrome version 56. My project requires chrome 51 which is present in 1.2.6. Please help if you know.

@malept malept changed the title how to specify different version of electron-prebuilt-compile with electron-forge init Specify an Electron version when initializing a new project Jun 7, 2017
@malept
Copy link
Member

malept commented Jun 7, 2017

@MarshallOfSound do you have any concerns about this feature request?

@anaisbetts
Copy link
Contributor

@sarabsandhu You can just change the version in package.json and re-run npm install

@sarabsandhu
Copy link
Author

@paulcbetts I have tried it and face issue described here
electron-userland/electron-prebuilt-compile#33

@sarabsandhu
Copy link
Author

@paulcbetts why request was closed?

@sarabsandhu
Copy link
Author

@paulcbetts , i have checked in my code at https://github.com/sarabsandhu/test-workstation.git if you want to reproduce the issue. I see below errors in dev tools when my initial window is launched

Failed to parse SourceMap: file:///C:/Users/someuser/src/Observable.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/toSubscriber.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/Subscriber.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/isFunction.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/Subscription.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/isObject.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/tryCatch.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/UnsubscriptionError.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/Observer.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/observable.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/Subject.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/ObjectUnsubscribedError.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/SubjectSubscription.js.map
Failed to parse SourceMap: file:///C:/Users/someuser/src/ErrorObservable.js.map

I also tried to build the app for windows platform. it builds successfully but initial window is never launched. I can see the process running in task manager in windows.

@anaisbetts
Copy link
Contributor

Failed to parse SourceMap: file:///C:/Users/someuser/src/toSubscriber.js.map

You can ignore this, it's just a warning

I also tried to build the app for windows platform. it builds successfully but initial window is never launched. I can see the process running in task manager in windows.

This is unrelated to this issue

@sarabsandhu
Copy link
Author

@paulcbetts , Should i open new issue for your comment "This is unrelated to this issue". If there is no issue with first error, then windows build should work/launch as it is when launched in dev mode with electron-forge start. Do you agree?

@tgds
Copy link
Contributor

tgds commented Feb 2, 2018

@paulcbetts Changing the version in package.json doesn't work. The problem is the start script calls electron-prebuild-compile/lib/cli.js to spawn electron process. electron-prebuild-compile specifies electron1.8.somebetaversion as its dependency instead of having electron as a peer dependency. Therefore it doesn't matter what version you have in your package.json, electron1.8 will be used (which currently has a terrible bug that whenever you try to type in console it crashes on Windows)

@tgds
Copy link
Contributor

tgds commented Feb 2, 2018

sorry, just noticed the original title. so the solution would be downgrading electron-prebuild-compile in my package.json. I presume its version is synced with the electron version it has as a dependency.

@MarshallOfSound
Copy link
Member

I presume it's version is synced with the electron version it has as a dependency.

That is correct 👍

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

No branches or pull requests

5 participants