0

I am trying to pack my application made in electron. Before continuing, I already checked 'electron-packager' is not recognized as an internal or external command . I've tried installing it the following ways.

npm install electron-packager 
npm install electron-packager --save-dev
npm install electron-packager --save-dev --save-exact
npm install electron-packager -g

npx electron-packager

None of them work. They all end in the same result. I've tried restarting CMD, because sometimes you have to. Nothing. Still getting the error. Is there anything I'm doing wrong? I'm running Node v11.11.0. Also, I'm not getting any errors until I run it.

Right at runtime of command.

X

Trying to run after installation.

X

James Z
  • 12,209
  • 10
  • 24
  • 44
  • You can try `npx electron-packager`. Alternatively, check where the binary is located and whether that location is part of your PATH. – snwflk Mar 08 '19 at 00:07
  • actually, i forgot to say i tried that too. it just gave me a bunch of errors about names and "unknown properties" – electroner1998 Mar 08 '19 at 00:10
  • this'll help. here https://imgur.com/3ktEGeS – electroner1998 Mar 08 '19 at 00:19
  • btw i did put a name. – electroner1998 Mar 08 '19 at 00:20
  • The messages shown in your screenshot are output from electron-packager. This means that you managed to run the application electron-packager. Please research the error messages shown in that output and/or consider opening a new question regarding those error messages. – snwflk Mar 08 '19 at 00:29
  • I searched up the errors like you said. If you put it as an answer, i'll count it. – electroner1998 Mar 08 '19 at 00:45
  • i got it to create my app – electroner1998 Mar 08 '19 at 00:45
  • There's no point for me to add an answer to this question, since it appears running electron-packager was not the actual problem. If you want, you can write an answer yourself and accept it. Furthermore, you can upvote helpful comments. – snwflk Mar 08 '19 at 01:06

1 Answers1

1
npx electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds

This works

Shadab K
  • 1,677
  • 1
  • 16
  • 25