nx icon indicating copy to clipboard operation
nx copied to clipboard

fix(webpack): fixing null pointer about projectGraph with nx enhance configuration

Open NicolasBelliard opened this issue 1 year ago • 2 comments

Hello!

I fixing issue related to nx project with enhanced webpack config.

I created this repository to reproduce the bug: https://github.com/NicolasBelliard/nx-enhance-example

Current Behavior

When created an Nx repository with nx enhanced config, we faced the current issue when we try to build the application.

> 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

Expected Behavior

No error and the build is working.

Related Issue(s)

https://github.com/nrwl/nx/issues/26303

NicolasBelliard avatar Jun 06 '24 18:06 NicolasBelliard

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Is it working in lasted version?

masterwishx avatar Aug 22 '24 09:08 masterwishx

I am experiencing the same issue as reported in #12248. The reputation policy is not being applied when the Password Stage is in the identification Stage.

Datenschmutz avatar Apr 17 '25 15:04 Datenschmutz