bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
328 stars 85 forks source link

Not working in Angular monorepo #305

Closed CoolTrainerEX closed 2 weeks ago

CoolTrainerEX commented 1 month ago

I imported nx-electron to an angular monorepo and when I try to use it (i.e. serve/build), the same error returns:

Cannot read properties of undefined (reading 'projects')

I have changed base href to "./" and used webpack, as the readme suggested. I am just a beginner, so I might just be overlooking something. Any help would be appreciated. Thanks!

julianpoemp commented 1 month ago

Got the same error. Seems like Nx v20 is breaking something. Nx 19 still worked so far.

cedric-mynotary commented 3 weeks ago

Same here, both with an existing project and a newly generated one. I cannot rollback to nx 19 but this might be the source of the issue.

o-glethorpe commented 3 weeks ago

Same here TypeError: Cannot read properties of undefined (reading 'projects') node_modules/nx-electron/src/utils/workspace.js:5:52

eweap commented 3 weeks ago
const { sourceRoot, root } = context.workspace.projects[context.projectName];

should become:

const { sourceRoot, root } = context.projectsConfigurations.projects[context.projectName];
bennymeg commented 2 weeks ago

Please advise the readme file regarding version computability. v20 is not released yet.