-
Notifications
You must be signed in to change notification settings - Fork 183
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
Electron path in 1.3.5 doesn't exist #180
Comments
I've tested 1.3.5 in both via the Mocha tests in the It sounds like |
I guess the problem is because your electron is locally installed and you are trying to use the globally-installed bytenode. With the latest change, (global) bytenode will look for the globally-installed electron, not the local one. This is not the desired behavior in my opinion. Bytenode should always use the locally-installed electron first. I'm not sure if it should look for the global one at all. (This depends on how electron apps building tools work though). So, as a proposed fix, we can tell the const modulePaths = [process.cwd(), ...require.resolve.paths('electron')];
const electronPath = path.join(path.dirname(require.resolve('electron', { paths: modulePaths })), 'cli.js'); Another workaround is to use the locally-installed bytenode: |
I have neither bytenode nor electron installed globally. Both are local to the project. It does seem to be returning an empty string, but I'm not sure why. |
If both are installed locally, then I cannot reproduce your issue. If you can create a minimal setup that shows the error, then we can look into it. |
I'm currently halfway through a sprint, and rolling back to the previous version works for now. Once I have a minute, I'll try setting this up in a new project to see if I can replicate it. Thanks for the quick replies. |
No worries, take your time. |
With the latest update, I am getting this error. Electron is clearly installed, but bytenode is unable to find it. Line 49 in lib/index.js was changed recently which seemed to break it. Console logging
electronPath
returns just 'cli.js'. Downgrading to 1.3.4 fixes the issue.The text was updated successfully, but these errors were encountered: