Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't deploy Electron app with angular app #313

Open
S-Mitterlehner opened this issue Aug 19, 2022 · 0 comments
Open

Can't deploy Electron app with angular app #313

S-Mitterlehner opened this issue Aug 19, 2022 · 0 comments

Comments

@S-Mitterlehner
Copy link

I have an existing nx workspace with an angular app inside.
Now I added an electron app via nx generate app and attached the angular project to it.

When I start the app with the command start.electron.sample-windows it works perfectly fine.

Now I want to build and deploy the electron-app but I'm running to an issue. Whenever I run the command build.electron.sample-windows.windows I get the error that the system can't find the path dist/apps/electron-sample-windows.
What is actually true, because during the process it just builds the angular app.

When I look into the angular.json file I see that the project electron-sample-windows points to the path of my angular app.

Is there an issue while generating the elecrton app?

here are the depending scripts from the package.json:

"scripts": {
    "ng": "nx",
    "postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2020 browser module main && electron-rebuild install-app-deps && electron-rebuild install-app-deps",
    "start": "nx serve",
    "build": "nx build",
    "test": "nx test",
    "build.electron.sample-windows": "npm run prepare.electron.sample-windows && ng build --project=electron-sample-windows --prod --base-href ./",
    "build.electron.sample-windows.local": "npm run build.electron.sample-windows && electron dist/apps/electron-sample-windows",
    "build.electron.sample-windows.linux": "npm run build.electron.sample-windows && cd dist/apps/electron-sample-windows && npx electron-builder build --linux",
    "build.electron.sample-windows.windows": "npm run build.electron.sample-windows && cd dist/apps/electron-sample-windows && npx electron-builder build --windows",
    "build.electron.sample-windows.mac": "npm run build.electron.sample-windows && cd dist/apps/electron-sample-windows && npx electron-builder build --mac",
    "prepare.electron.sample-windows": "tsc -p apps/electron-sample-windows/tsconfig.json",
    "serve.electron.sample-windows.target": "nx serve electron-sample-windows",
    "serve.electron.sample-windows": "wait-on http-get://localhost:4200/ && electron apps/electron-sample-windows/src --serve",
    "start.electron.sample-windows": "npm run prepare.electron.sample-windows && npm-run-all -p serve.electron.sample-windows.target serve.electron.sample-windows"
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant