Attempting to initiate my angular project using ./mvnw is resulting in an error when the build runs
ng build --configuration development
.
The error message thrown reads as follows:
Generating browser application bundles (phase: setup)...
[INFO] /home/user/Desktop/project/node_modules/@ngtools/webpack/src/ngcc_processor.js:139
[INFO] throw new Error(errorMessage + `NGCC failed${errorMessage ? ', see above' : ''}.`);
[INFO] ^
[INFO]
[INFO] Error: spawnSync /home/user/Desktop/project/target/node/node ENOENTNGCC failed, see above.
[INFO] at NgccProcessor.process (/home/user/Desktop/project/node_modules/@ngtools/webpack/src/ngcc_processor.js:139:19)
[INFO] at /home/user/Desktop/project/node_modules/@ngtools/webpack/src/ivy/plugin.js:143:27
[INFO] at Hook.eval [as call] (eval at create (/home/user/Desktop/project/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:16:1)
[INFO] at Hook.CALL_DELEGATE [as _call] (/home/user/Desktop/project/node_modules/tapable/lib/Hook.js:14:14)
[INFO] at Compiler.newCompilation (/home/user/Desktop/project/node_modules/webpack/lib/Compiler.js:1054:30)
[INFO] at /home/user/Desktop/project/node_modules/webpack/lib/Compiler.js:1099:29
[INFO] at eval (eval at create (/home/user/Desktop/project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:31:1)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
Strangely, running the same command without the maven wrapper locally results in a successful ng build
.
Here are my dependencies listed in package.json:
// List of dependencies
// List of devDependencies
// Engine requirements
// Cache directories
// JestSonar configuration
// Overrides
I have tried adjusting ivy compiler options, as well as removing or updating third-party packages, but I have not been able to pinpoint the problematic package. Additionally, each time before rebuilding with the ./mvnw command, I delete the package-lock.json and node_modules.
Your insights and suggestions would be greatly appreciated!