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

Serving or building ElectronJS application gives error #311

Open
Distrect opened this issue Nov 15, 2024 · 3 comments
Open

Serving or building ElectronJS application gives error #311

Distrect opened this issue Nov 15, 2024 · 3 comments

Comments

@Distrect
Copy link

Error Descripton
When i run the build or serve script, it is throws "Cannot read properties of undefined (reading 'projects')" error

To Reproduce
Steps to reproduce the behavior:

  1. Create nx workspace npx create-nx-workspace --preset=apps
  2. Install nx-electron nx add nx-electron
  3. Create electron app by nx g nx-electron:app app name:project-tool,directory:,web app name:client
  4. Serve or build electron app by nx project-tool:serve

Error Output
TypeError: Cannot read properties of undefined (reading 'projects') at getSourceRoot (C:\Users\myfor\OneDrive\Masaüstü\projectTool\node_modules\nx-electron\src\utils\workspace.js:5:52) at executor (C:\Users\myfor\OneDrive\Masaüstü\projectTool\node_modules\nx-electron\src\executors\build\executor.js:17:71) at runExecutorInternal (C:\Users\myfor\OneDrive\Masaüstü\projectTool\node_modules\nx\src\command-line\run\run.js:98:19) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async C:\Users\myfor\OneDrive\Masaüstü\projectTool\node_modules\nx\src\command-line\run\run.js:176:44 at async handleErrors (C:\Users\myfor\OneDrive\Masaüstü\projectTool\node_modules\nx\src\utils\handle-errors.js:8:24) at async process.<anonymous> (C:\Users\myfor\OneDrive\Masaüstü\projectTool\node_modules\nx\bin\run-executor.js:59:28)

Expected behavior
I am expecting to application run and build without error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11 23H2 22631.4317
  • nx-electron version: ^19.0.0
@AntoineRosse1400
Copy link

Same issue for me.

@glani
Copy link

glani commented Dec 7, 2024

incompatible with nx 20. we need changes from #315

@faribauc
Copy link

faribauc commented Dec 11, 2024

Update nx-electron to the latest alpha

    "nx-electron": "^20.0.0-alpha.0",

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

4 participants