bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
309 stars 82 forks source link

Nx-Electron Unable to make project #206

Closed IbnAdamnet closed 1 year ago

IbnAdamnet commented 1 year ago

Please help, I am able to build BUT unable to package or make electron app with the nx-electron. It's seeking out for some "index.js" at dist directory and I can't find where it's configure to look a file not present in the source file. I deleted the NPM node_modules and re-installed but to no avail.

nx

THANKS

custompro12 commented 1 year ago

You have to build each of your projects for production before you package things up.

  1. nx build <frontend-app-name>
  2. nx build <backend-app-name>
  3. nx build <electron-app-name> <-- This creates the index.js file that your screenshot is looking for
  4. etc...
  5. THEN nx run <electron-app-name>:package
AlstonTsaoTSMC commented 1 year ago

after nx run <electron-app-name>:package I didn't see any binary in dist/apps/myapp/executebales, what's going on?

custompro12 commented 1 year ago

after nx run <electron-app-name>:package I didn't see any binary in dist/apps/myapp/executebales, what's going on?

:package doesn't produce anything in dist/apps. You should see files in dist/packages. For example, dist\packages\win-unpacked\electron.exe