I have create a python3 app using the Electron environment (itself based on Node.js).
For this app, the dependencies have been installed using npm and my app launches using the npm start
command.
Following the documentation of Electron, it seems that Electron-builder is the best option for distributing my app for all platforms. Unfortunately, the installation guide recommends using yarn, not npm as npm might not be working properly : see related ticket
Now my question is: As the ticket is rather old (2017), is it now possible to make it work with npm ? So yes how ?
If it is not possible to make it work with npm, how do I transition my code to yarn ?
For info:
The reason I ask is because I get a BIIIIIG error message when I run the command npm run dist
.
If needed I can edit the post to include it (alongside my package.json file)
Thanks in advance.
EDIT: adding error and package.json
{
"name": "APP_NAME",
"version": "1.0.0",
"description": "The first version of APP_NAME's GUI.",
"main": "index.js",
"homepage": "https://docenhance.com",
"author": "DocEnhance <[email protected]>",
"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"
}
}
The error file can be found HERE.