Qualphey commented on pull request #371:
URL: 
https://github.com/apache/cordova-plugin-file/pull/371#issuecomment-748500798


   > Try to remove `node_modules`, `platforms`, `plugins` and run `npm i && npx 
cordova prepare`
   
   I'm using cordova `10.0.0` with cordova-electron `2.0.0` on Linux. When the 
plugin gets loaded it throws an error:
   ```
    Uncaught TypeError: Cannot read property 'app' of undefined
   ```
   Source: 
**[src/electron/FileProxy.js:35](https://github.com/zorn-v/cordova-plugin-file/blob/655b0c15b4352a6007d2cd4795e9a7344b512254/src/electron/FileProxy.js#L35)**
   
   so it's this line:
   ```
   const app = nodeRequire('electron').remote.app;
   ```
   I've checked the result of `console.log(nodeRequire('electron'))` and it 
does not contain no properties like `remote`, `app` or anything similar. There 
is a `webFrame` property but it does not contain any functions that are used by 
the plugin.
   
   Is this happening because I'm using a wrong cordova or cordova-electron 
version?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to