MarBas97 commented on issue #216: URL: https://github.com/apache/cordova-electron/issues/216#issuecomment-1108682054
I'm using cordova-electron with Ionic and what happened in my case. Cordova-Electron is using: - [Two package.json Structure](https://www.electron.build/tutorials/two-package-structure.html) to manage application dependencies. First package.json is located in your base directory and is under my control (source control-wise). The second one is located under ./platforms/electron/www/package.json which is not under my control (and shouldn't be as it will be replaced after every platform add/remove) - Electron-Builder to bundle and build your application. After I run "ionic cordova build electron", electron-builder is running npm install (with some flags) behind the scenes, however, it is using dependencies from package.json located in platform/electron/www directory, not the project one. So none of the npm modules is not loaded because they are missing in the package.json file. Breaking change can be found in this commit: #175 in the PackageJsonParser.js file. A deleted part from lines 42 to 82 was responsible for coping dependencies from your project package.json to electron package.json. I think it was done because of security reasons, as it was done in the same commit where context isolation was enabled and node integration disabled. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
