Closed nolegendhere closed 2 years ago
it is also happing with a project without angular, for example your https://github.com/FrozenPandaz/nx-minimal from https://www.youtube.com/watch?v=0WADb34Yjmg
We currently disable js source file analysis in workspaces that use npx add-nx-to-monorepo
, or others that consume nx/presets/npm.json
in nx.json
.
You can re-enable that by adding this to your nx.json
:
"pluginsConfig": {
"@nrwl/js": {
"analyzeSourceFiles": true
}
}
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
NX 14.2.0 and next versions
We want to follow the angular layout only installing the nx package and adding the nx.json
Current Behavior
With an angular monorepo, running the command npx add-nx-to-monorepo adding only the package nx and the nx.json file, with the command dep-graph or affected:graph, the graph shown is flat, without dependencies
Expected Behavior
Like previous versions, for example 14.0.0 to 14.1.10, the graph should show the dependencies between libraries and apps
Steps to Reproduce
Generate a new angular workspace without an application like the angular libs tutorial indicates https://angular.io/guide/creating-libraries. Generate two applications, my-app01 and my-app02. Then, generate two libs, my-lib01 and my-lib02. Add my-lib01 ngModule to imports of my-app01 and my-lib02 to ngModule imports of my-app02. Run the command npx add-nx-to-monorepo, It will create and nx.json file and add the package nx to devDependencies in the package.json. Try with the different versions of nx package, from 14.0.0 to the latest the command dep-graph and affected:graph to see the results.
Environment
Ubuntu 20.04.4 LTS