apache / apache/cordova-electron
Cordova electron is not packaging the dependencies
- Dominant language
- JavaScript
- Stars
- 135
- Forks
- 60
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 5
Description
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.
Cordova@12.0.0
Cordova-electron@3.1.0
Angular@14.x.x
Node@16.20.2
OS: Windows
Contributor guide
Research direction
Reproduce the packaged build with the tcp-plugin import of event-pubsub, starting from the cordova build electron command and the platform/electron/build output. Inspect how the plugin dependency is included in the packaged Electron executable. Done means the packaged app starts without the “Module not found: event-pubsub” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, electron, javascript, node.js
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100