I have recently developed a Python3 application using the Electron framework, which is built on top of Node.js.
To set up dependencies and launch the app, I installed them using npm and run it with npm start
.
After referring to the Electron documentation, it appears that Electron-builder is the recommended tool for distributing my app across all platforms. However, the installation instructions suggest using yarn instead of npm due to potential issues with npm functionality: refer to this related ticket
My main query is: since the linked ticket dates back to 2017, can the distribution still be achieved using npm? If so, how?
If leveraging npm is not feasible, what steps should I take to migrate my code to yarn?
Just for context:
I encounter a significant error message when running npm run dist
. Should you need it, I am willing to share the error details (alongside my package.json file)
Thank you in advance.
UPDATE: including error log and package.json file
{
"name": "APP_NAME",
"version": "1.0.0",
"description": "The initial release of APP_NAME's graphical user interface.",
"main": "index.js",
"homepage": "https://docenhance.com",
"author": "DocEnhance <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cfa1a0a0bbaea4ba8fa8a2aea6a3e1aca0a2">[email protected]</a>>",
"license": "MIT",
"scripts": {
"postinstall": "electron-builder install-app-deps",
"start": "npm install && electron .",
"pack": "electron-builder --dir",
"dist": "electron-builder"
},
"build": {
"appId": "com.docenhance.APP_NAME",
"productName": "APP_NAME - PROJECT_NAME",
"linux": {
"target": "deb",
"icon": "build/icon.icns",
"category": "Office"
}
},
"devDependencies": {
"bootstrap": "^4.1.2",
"electron": "^4.0.7",
"electron-builder": "^20.39.0",
"jquery": "^3.3.1"
},
"dependencies": {
"bootstrap": "^4.3.1",
"jquery": "^3.3.1",
"popper.js": "^1.14.7",
"python-shell": "^1.0.7"
}
}
You can access the error log file HERE.