Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

After trying the procedure in README.md (in Linux Operating System) #1

Open
Vetagiri-Hrushikesh opened this issue May 28, 2021 · 2 comments

Comments

@Vetagiri-Hrushikesh
Copy link

`
• electron-builder version=22.9.1 os=5.11.0-17-generic

• writing effective config file=platforms/electron/build/builder-effective-config.yaml

• installing production dependencies platform=win32 arch=x64 appDir=/home/osboxes/Desktop/Hrushikesh/Testing/test-cordova-electron/platforms/electron/www

• packaging platform=win32 arch=x64 electron=10.1.2 appOutDir=platforms/electron/build/win-unpacked

• downloading url=https://github.com/electron/electron/releases/download/v10.1.2/electron-v10.1.2-win32-x64.zip size=77 MB parts=4

• downloaded url=https://github.com/electron/electron/releases/download/v10.1.2/electron-v10.1.2-win32-x64.zip duration=2m27.119s

• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1

• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=10.58s

⨯ wine is required, please see https://electron.build/multi-platform-build#linux

• Above command failed, retrying 3 more times

⨯ wine is required, please see https://electron.build/multi-platform-build#linux

• Above command failed, retrying 2 more times

⨯ wine is required, please see https://electron.build/multi-platform-build#linux

• Above command failed, retrying 1 more times

⨯ wine is required, please see https://electron.build/multi-platform-build#linux

• Above command failed, retrying 0 more times

/home/osboxes/Desktop/Hrushikesh/Testing/test-cordova-electron/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE • electron-builder version=22.9.1 os=5.11.0-17-generic

• writing effective config file=platforms/electron/build/builder-effective-config.yaml

• installing production dependencies platform=win32 arch=x64 appDir=/home/osboxes/Desktop/Hrushikesh/Testing/test-cordova-electron/platforms/electron/www

• packaging platform=win32 arch=x64 electron=10.1.2 appOutDir=platforms/electron/build/win-unpacked

• downloading url=https://github.com/electron/electron/releases/download/v10.1.2/electron-v10.1.2-win32-x64.zip size=77 MB parts=4

• downloaded url=https://github.com/electron/electron/releases/download/v10.1.2/electron-v10.1.2-win32-x64.zip duration=2m27.119s

• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1

• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=10.58s

⨯ wine is required, please see https://electron.build/multi-platform-build#linux

• Above command failed, retrying 3 more times

⨯ wine is required, please see https://electron.build/multi-platform-build#linux

• Above command failed, retrying 2 more times

⨯ wine is required, please see https://electron.build/multi-platform-build#linux

• Above command failed, retrying 1 more times

⨯ wine is required, please see https://electron.build/multi-platform-build#linux

• Above command failed, retrying 0 more times

/home/osboxes/Desktop/Hrushikesh/Testing/test-cordova-electron/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
`

@Jahrenski
Copy link
Owner

Hi, seems like your device is missing the Wine component for linux.
I'm not a linux user myself but here's some more documentation :

https://www.electron.build/multi-platform-build#linux

@Vetagiri-Hrushikesh
Copy link
Author

Thanks for the reply. I will try this tonight, but by following this (what you have mentioned) I tried to do something similar in my custom Cordova plugin.

const {add} = global.require("./addon.node");
console.log(add(2,3);

But this time I didn't get something like mentioned above issue. But I faced by using global.require(), in case if I use only require then addon.node is not defined.

Uncaught ReferenceError: global is not defined
    at MaighaPluginProxy.js:2
    at build (cordova.js:47)
    at require (cordova.js:62)
    at localRequire (cordova.js:43)
    at Object.exports.mapModules (cordova.js:1244)
    at cordova.js:1168
    at Channel.f (cordova.js:670)
    at Channel.fire (cordova.js:823)
    at cordova.js:1160
    at onScriptLoadingComplete (cordova.js:1369)

I also tried using

global.require(./../../../../addon.node) ( because when we add the plugin to cordova project addon.node is adding at cordova-plugin-name/platforms/electron/platform_www and cordova-plugin-name/platforms/electron/www but not in test-cordova-electron/platforms/electron/platform_www/plugins/cordova-plugin-name/src/electron/ or  test-cordova-electron/platforms/electron/www/plugins/cordova-plugin-name/src/electron/ )  - (issue :  global is not defined)
global.require(./addon.node) - (issue :  global is not defined)
require(./addon.node) - (issue :  addon.node is not defined)

Can you please help me with this?
Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants