-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
indexOf Error with Quasar, Electron, and Serialport #2089
Comments
Having the same issue. I believe its to do with there being no build for my setup using electron-rebuild. |
@fdeitelhoff Try adding the following to your vue.config.js |
I've read this suggestion very often. I'm using the Quasar CLI, and there is no |
@fdeitelhoff I haven't used Quasar before, but I assume there is somewhere to edit webpack in Quasar. Quickly looking at the framework this might help. |
@fdeitelhoff
reference: vue-cli-plugin-electron-builder-guide |
Thanks for your answer. I have no vue.config.js with Quasar CLI. Do I need to create it? Or is this all just working with vue-cli-plugin? |
vue.config.js is not necessary,You can refer to my project nebula-helper, I use node-serialport with electron
SerialPort v9.0.0 with electron-9.0.0 is not run, I use electron-8.4.0
|
The solution in this SO post worked for me https://stackoverflow.com/questions/62360403/quasar-framework-electron-and-serialport-indexof-error |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week no further activity occurs. Feel free continue the discussion or ask for a |
To solve this for me I had to do the following (I am using the react-electron boilerplate): Add the following to webpack.config.base.js:
Add the following to index.html
Use serialport in js/tsx as you would do normally:
|
Summary of Problem
I'm setting up a test project with Quasar, Electron, and serialport.
The installation of every dependency works just fine. I call electron-rebuild and the message says everything works. But the build folder under "@serialport" does not get an update (or is even created, if I remove it first). This could be the problem, but when I start the Electron app, I see this in the console:
At least the error should disappear means the Electron app should start without the error.
Code to Reproduce the Issue
This is the Index.vue of the Vue.js Electron app that's get created with the Quasar CLI:
The import statement is enough to provoke the error.
I tried everything I could find here, in the Quasar forum, etc. pp.: electron-rebuild, trying to config serialport as an external dependency, ...
I'm not quite sure if the rebuild process is working as expected, but I don't know what to check to make sure it does. The electron example project with serialport is working for me. Maybe it is a Quasar related thing?
Versions, Operating System and Hardware
The text was updated successfully, but these errors were encountered: