miroslavvojtus opened a new issue #211:
URL: https://github.com/apache/cordova-electron/issues/211
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used [patch-package](https://github.com/ds300/patch-package) to
patch `[email protected]` for the project I'm working on.
Without that I observed that quite often (3 of 5) a clean run (platform with
plugins readded) of project with local plugin with several frameworks with
clashing dependency lists fails on some random error in regards to imports from
node modules.
Each time I found some installed packages with missing files.
The source of problem seems to be asynchroncity of execa.
Here is the diff that solved my problem:
```diff
diff --git a/node_modules/cordova-electron/lib/handler.js
b/node_modules/cordova-electron/lib/handler.js
index ffa9e80..1b2e5ea 100644
--- a/node_modules/cordova-electron/lib/handler.js
+++ b/node_modules/cordova-electron/lib/handler.js
@@ -117,7 +117,7 @@ module.exports = {
const wwwDir = path.join(project_dir, 'www');
- execa('npm', ['install', electronPluginSrc], {
+ execa.sync('npm', ['install', electronPluginSrc], {
cwd: wwwDir
});
```
<em>This issue body was [partially generated by
patch-package](https://github.com/ds300/patch-package/issues/296).</em>
--
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]