The issue it is when I ran the build or serve I have the following error:
> nx run nx-enhance:build
> webpack-cli build --node-env=production
[webpack-cli] TypeError: Cannot read properties of undefined (reading 'nodes')
at calculateProjectDependencies (/home/test/dev/nx-enhance/node_modules/@nx/js/src/utils/buildable-libs-utils.js:24:30)
at calculateProjectBuildableDependencies (/home/test/dev/nx-enhance/node_modules/@nx/js/src/utils/buildable-libs-utils.js:20:12)
at NxTsconfigPathsWebpackPlugin.handleBuildLibsFromSource (/home/test/dev/nx-enhance/node_modules/@nx/webpack/src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin.js:37:111)
at NxTsconfigPathsWebpackPlugin.apply (/home/test/dev/nx-enhance/node_modules/@nx/webpack/src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin.js:17:14)
at createCompiler (/home/test/dev/nx-enhance/node_modules/webpack/lib/webpack.js:78:12)
at create (/home/test/dev/nx-enhance/node_modules/webpack/lib/webpack.js:145:16)
at webpack (/home/test/dev/nx-enhance/node_modules/webpack/lib/webpack.js:153:47)
at WebpackCLI.f [as webpack] (/home/test/dev/nx-enhance/node_modules/webpack/lib/index.js:73:16)
at WebpackCLI.createCompiler (/home/test/dev/nx-enhance/node_modules/webpack-cli/lib/webpack-cli.js:1785:29)
at async WebpackCLI.runWebpack (/home/test/dev/nx-enhance/node_modules/webpack-cli/lib/webpack-cli.js:1877:20)
Warning: command "webpack-cli build --node-env=production" exited with non-zero status code
Process finished with exit code 1
> nx run nx-enhance:build
> webpack-cli build --node-env=production
[webpack-cli] TypeError: Cannot read properties of undefined (reading 'nodes')
at calculateProjectDependencies (/home/test/dev/nx-enhance/node_modules/@nx/js/src/utils/buildable-libs-utils.js:24:30)
at calculateProjectBuildableDependencies (/home/test/dev/nx-enhance/node_modules/@nx/js/src/utils/buildable-libs-utils.js:20:12)
at NxTsconfigPathsWebpackPlugin.handleBuildLibsFromSource (/home/test/dev/nx-enhance/node_modules/@nx/webpack/src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin.js:37:111)
at NxTsconfigPathsWebpackPlugin.apply (/home/test/dev/nx-enhance/node_modules/@nx/webpack/src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin.js:17:14)
at createCompiler (/home/test/dev/nx-enhance/node_modules/webpack/lib/webpack.js:78:12)
at create (/home/test/dev/nx-enhance/node_modules/webpack/lib/webpack.js:145:16)
at webpack (/home/test/dev/nx-enhance/node_modules/webpack/lib/webpack.js:153:47)
at WebpackCLI.f [as webpack] (/home/test/dev/nx-enhance/node_modules/webpack/lib/index.js:73:16)
at WebpackCLI.createCompiler (/home/test/dev/nx-enhance/node_modules/webpack-cli/lib/webpack-cli.js:1785:29)
at async WebpackCLI.runWebpack (/home/test/dev/nx-enhance/node_modules/webpack-cli/lib/webpack-cli.js:1877:20)
Warning: command "webpack-cli build --node-env=production" exited with non-zero status code
Process finished with exit code 1
Current Behavior
Hello!
I created an nx app with cli create-nx-workspace with the following param:
Then I updated the wepack config to move to nx-enhance configuration as it is written in the doc here
You can see bellow the following config:
The issue it is when I ran the build or serve I have the following error:
I created the following repository if you want to try on your local: https://github.com/NicolasBelliard/nx-enhance-example
Thank you for your help.
Expected Behavior
When I run the command nx run nx-enhance:build I have no error
GitHub Repo
https://github.com/NicolasBelliard/nx-enhance-example
Steps to Reproduce
npm i
nx serve nx-enhance
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response