angular-architects / nx-ddd-plugin

Nx plugin for structuring a monorepo with domains and layers
308 stars 55 forks source link

issue in domain generator when creating an associated application #134

Open FabienDehopre opened 10 months ago

FabienDehopre commented 10 months ago

In the latest nx workspace, when you try to create a domain with an associated application (--addApp=true), the generator fail with the following error message: "Cannot read properties of undefined (reading 'replace')". In fact, the issue comes from the fact that the generator tries to get the workspace npm scope from the nx.json file (using the readWorkspaceConfiguration function). Unfortunately, the npmScope property on the nx.json file is now deprecated (see official doc: https://nx.dev/packages/devkit/documents/Workspace#npmscope) and is not added to the nx.json file in new workspace. To get the workspace npm scope, you need to use the getNpmScope function instead.

L-X-T commented 9 months ago

Thank you for the report @FabienDehopre, I've encountered a similar problem which is also due to the reading of the npmScope. I'll inform @manfredsteyer.