Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Running quasar dev -m electron from inside WSL #163

Open
arosemena opened this issue Aug 4, 2018 · 2 comments
Open

Running quasar dev -m electron from inside WSL #163

arosemena opened this issue Aug 4, 2018 · 2 comments

Comments

@arosemena
Copy link

Software version, 0.16.4

OS: Windows WSL
Node: v10.5.0
NPM: 6.2.0

What did you get as the error?

quasar dev -m electron doesn't work when ran from WSL (windows subsystem for linux)

What were you expecting?

for electron to run normally

What steps did you take, to get the error?

Install electron from windows with npm install electron, run quasar dev -m electron from WSL, the error happens when it uses the WSL paths but electron requires the windows version of the path.

The fix I managed to implement is to change appPaths.resolve.app('.quasar/electron/electron-main.js') to .quasar/electron/electron-main.js @ /lib/electron/index.js:157, without the path resolve function this loads electron with the app in the intended way, it works because the process is ran in the project directory and the script is loaded relative to itself, I didn't submit a pull request because I'm not sure how to implement this in a way that it doesn't break compatibility with other systems, to check if the command is ran from within WSL a simple test can be ran:

const os = require('os');
let isWSL = process.platform === 'linux' && os.release().includes('Microsoft');
@rstoenescu
Copy link
Member

rstoenescu commented Aug 9, 2018

Hi,

Thanks for also offering a possible fix.

I'm a little surprised that nodejs path.resolve doesn't works correctly with WSL. This should be fixed in Nodejs rather than working around the real issue in Quasar CLI.

In any case, does anything else break in WSL? (SPA, PWA, SSR, Cordova)

Thanks,
Razvan

@arosemena
Copy link
Author

I've done some SPA projects and it works nicely out of the box from WSL, auto opens works too.

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

2 participants