Open solodov-dev opened 9 months ago
Have the same issue.
For both your renderer
and main
electron projects, try adjusting the outputPath
field of project.json
in both projects to be something like:
"outputPath": "dist/apps/myproject-electron",
instead of:
"outputPath": "dist/apps/myproject/electron",
That way they're both emitting to the root dist/apps
directory without any further nesting. I'm not sure if it's the same issue you're having, but it sounds similar. I needed to do this in order for :make
to work.
Describe the bug After upgrading from v.13 to v.16 I cannot build the electron app.
Expected behavior Running
nx run <app-name>-electron:make
makes an electron executable.Desktop (please complete the following information):
Additional context I've been assigned to an existing project which uses nx, react and electron. The project was running nx 13. I've upgraded everything to v.16. Nx electron was upgraded to v16.0.0-beta.1.
After upgrading I cannot run
nx run <app-name>-electron:make
. I am getting this error:ENOENT no such file or directory '/home/<user>/code/<project-dir>/dist/packages/<app-name>-electron/index.js'
.The electron:build command creates a folder
dist/apps/<app-name>-electron
and not thedist/packages...
folder. Also there is no index.js file in thedist/apps/<app-name>-electron
folder, but a main.js file instead. I understand that I have to set some options for the electron:make command, but setting these options in maker.options.json doesn't help.Any help would be appreciated ( I'm trying to build this thing for 3 days already