You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/05/06 06:55:50 UTC

[GitHub] [cordova-electron] NishilSB opened a new issue, #216: external NPM modules are not loading after building cordova-electron@3.0.0

NishilSB opened a new issue, #216:
URL: https://github.com/apache/cordova-electron/issues/216

   I am using cordova-electron@3.0.0 which I recently upgraded. I need to use some of the npm modules to work with the main process but after building the application, those modules are not taking but it workes when I do run the application.
   what would be the possible issue


-- 
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: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-electron] NishilSB closed issue #216: external NPM modules are not loading after building cordova-electron@3.0.0

Posted by GitBox <gi...@apache.org>.
NishilSB closed issue #216: external NPM modules are not loading after building cordova-electron@3.0.0
URL: https://github.com/apache/cordova-electron/issues/216


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-electron] NishilSB commented on issue #216: external NPM modules are not loading after building cordova-electron@3.0.0

Posted by GitBox <gi...@apache.org>.
NishilSB commented on issue #216:
URL: https://github.com/apache/cordova-electron/issues/216#issuecomment-1119313351

   > what would be the possible issue
   
   


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-electron] MarBas97 commented on issue #216: external NPM modules are not loading after building cordova-electron@3.0.0

Posted by GitBox <gi...@apache.org>.
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-electron] NishilSB commented on issue #216: external NPM modules are not loading after building cordova-electron@3.0.0

Posted by GitBox <gi...@apache.org>.
NishilSB commented on issue #216:
URL: https://github.com/apache/cordova-electron/issues/216#issuecomment-1119315912

   any workaround for fixing this issue? 
   @timbru31 @MarBas97  please let me know if there is any alternative way to install any npm package in corodova-electron?


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org