After extensively researching online, I still haven't found a solution to this particular issue.
I've attempted various troubleshooting steps, including deleting node_modules and package-lock.json, updating dependencies, and running nx migrate.
In my workspace project, I have checked for two node_modules but couldn't find any.
Although the npm install command runs successfully, I encounter the following error when running nx serve:
./apps/app name/src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Cannot resolve type entity i20.CdkScrollableModule to symbol at \node_modules@ngtools\webpack\src/ivy\loader.js:77:18 at processTicksAndRejections (internal/process/task_queues.js:93:5)
./apps/app name/src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Cannot resolve type entity i20.CdkScrollableModule to symbol at \node_modules@ngtools\webpack\src/ivy\loader.js:77:18 at processTicksAndRejections (internal/process/task_queues.js:93:5)
Below is an excerpt from the Package.json file:
{
"name": "nx-test",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "nx",
"postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser
module main",
"start": "nx serve",
"build": "nx build",
"test": "nx test"
},
"private": true,
"dependencies": {
"@angular/animations": "~13.2.0",
"@angular/common": "~13.2.0",
...
"typescript": "~4.5.2"
}
}