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
Libraries built using vue-cli produce "$attrs/$listeners/props are readonly" errors when consumed in Electron apps #22
Comments
This might be caused by electron-webpack which will be replaced in v1.0.0. If the issue still persists in that version, I'll take a closer look at this. Expect a beta within 1-2 weeks. |
I just released the first v1.0.0 alpha! Go ahead and try it again with the new version and let me know if it works. Thanks. |
I tried updating the repo linked above to v1.0.0-alpha.2 of your plugin and following your upgrade guide. I'm finding that serving in a regular browser (
Latest commit: TAGC/vue-electron-bug@48eb5f8 Environment
|
I created #24 for the serve: electron problem. I will look into the other issue soon. |
Please follow the instructions on this issue comment for the serve:electron issue. I run into an install error when following the instructions for your repo (I'm on windows btw). |
@nklayman I got errors similar to that using npm v6.1.0 on Windows. npm v6 seems pretty broken and I encountered other issues with it too. Are you able to install dependencies with npm v5.6.0? |
Seems it might be something to do with VS Code locking |
2018-06-18T22_03_51_221Z-debug.log However, it worked using yarn. Electron launched just fine, and there was no errors like the ones initially mentioned in this issue. I will close this issue as it appears to be fixed, and will continue to look into #24, which seems like a macOS only bug. Thanks |
Cross-posting an issue from vuejs/vue-cli#1583 as it may be more appropriate here. TL;DR: when libraries built using vue-cli are consumed inside Electron apps, it seems like they reference one version of the Vue bundle while a different version gets bundled in renderer.js. I was wondering if it's possible for you to modify this plugin to adjust the webpack config that vue-cli generates by default to make libraries play nice in Electron apps.
Version
vue-cli: 3.0.0-rc.1
vue-cli-plugin-electron-builder: 0.3.2
Reproduction link
https://github.com/TAGC/vue-electron-bug
Steps to reproduce
lib
, install dependencies and build it withnpm run build
.app
, install dependencies.npm run serve
. Open the browser devtools and check for errors in the console while clicking the button.npm run electron:serve
. Repeat the above procedure, monitoring for errors in the Electron devtools console.What is expected?
No console errors should appear in either case.
What is actually happening?
When serving as an Electron app, three errors appear every time the button is clicked.
I've done some digging and it seems a number of projects have encountered this problem when their libraries are used in Electron apps. It has something to do with the Electron renderer process using a different version of the Vue bundle than the one the library uses - these two Vue bundles conflict with each other.
This issue comment sheds some light on the issue, although I haven't yet tried the solution the person proposes.
The text was updated successfully, but these errors were encountered: