question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set electron-packager start command?

See original GitHub issue

This may be a dumb question, but I take the risk to ask it. I have the following package.json :

{
    "name": "some-app",
    "description": "Some App",
    "version": "0.1.2",
    "main": "main.js",
    "scripts" : {
        "start": "electron ."
    },
    "repository": {
        "type": "git",
        "url": "https://github.com/FliiFe/App.git"
    },
    "dependencies": {
        "express": "",
        "electron": "",
        "portscanner": ""
    },
    "license": "Apache-2.0"
}

And it works with nmp start. Problem is : How to make it work with electron-packager ?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:26 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
lddcommented, Feb 29, 2020

I know this is a closed ticket, but because this is where google sent me when trying to solve my problem, here’s a potential solution:

On MacOS, if you have a dist/ folder, just copy your package.json into it. then everything should work smoothly

2reactions
herrmannplatzcommented, Sep 29, 2015

If i don’t get it wrong, i would suggest to do the following:

npm install electron-packager --save

Then define the package script:

"scripts" : {
  "start": "electron-packager . dist --platform=win32 --arch=x64 --version=0.33.3",
},

I would also suggest to have npm start (electron .) for dev and npm package(electron-packager . …) to bundle the app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron packager tutorial - Christian Engvall
Run these commands in the terminal in the app folder: # for use in npm scripts npm install electron-packager --save-dev # for use...
Read more >
electron-packager - npm
Start using electron-packager in your project by running `npm i electron-packager`. There are 164 other projects in the npm registry using ...
Read more >
Options | electron-packager
mirrorOptions is set. Defaults to the arch of the host computer running Electron Packager. Arch values for the official prebuilt Electron binaries:.
Read more >
Packaging Your Application | Electron
You can install Electron Forge's CLI in your project's devDependencies and import your existing project with a handy conversion script.
Read more >
electron-packager start command - npm scripts - Stack Overflow
I was wondering if anyone knows how I can define the command used for the packaged electron app. I have a command to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found