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

Cordova electron is not packaging the dependencies #259

Open
mhammad-extron opened this issue Sep 27, 2023 · 5 comments
Open

Cordova electron is not packaging the dependencies #259

mhammad-extron opened this issue Sep 27, 2023 · 5 comments

Comments

@mhammad-extron
Copy link

I'm currently working on a Cordova Angular application that utilizes the Electron platform. As part of the project, I've integrated a library named "event-pubsub.". The installed library is in node_modules folder.

I have also written a custom Cordova Electron plugin, named "tcp-plugin," where I am importing the above library:

var Events = self.require('event-pubsub');

To include this plugin in the Cordova Angular project, I used the following command:

cordova plugin add tcp-plugin

Building the project with ng build worked without any issues, and I can successfully build the Electron app as well using:

cordova build electron

However, upon running the packaged Electron executable file from /platform/electron/build/, I encounter a plugin-related error:

Module not found: event-pubsub

I would appreciate any assistance in resolving this issue.

[email protected]
[email protected]
[email protected]
[email protected]
OS: Windows

@laux98
Copy link

laux98 commented Oct 11, 2023

Hello @mhammad-extron , did you find a solution about this problem ?
I have the same issue here with the library serialport, on windows 10, 11 and ubuntu 22.04.

@mhammad-extron
Copy link
Author

@laux98
Sorry, I havent found the solution yet.

@laux98
Copy link

laux98 commented Oct 19, 2023

Unfortunately, after few days of researchs, I don't find a solution about this problem.
So, for my project, I decided to switch on electron (not cordova-electron) for using serial port and this work this way, but I can't find a solution about using serialport with cordova-electron ...

@erisu
Copy link
Member

erisu commented Oct 19, 2023

@mhammad-extron take a look at this comment: apache/cordova#439 (comment)

It might point you into the right direction.

@CHHHAN

This comment was marked as off-topic.

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

No branches or pull requests

4 participants