. Advertisement .
..3..
. Advertisement .
..4..
I get an error
Cannot read property 'thisCompilation' of undefined
when trying to run the command ‘ng serve’ in the latest version of Visual Studio Code. How to fix the cannot read property ‘thiscompilation’ of undefined error? Please give me some advice.
The cause: I think this error happens because you don’t uninstalling and reinstalling the latest webpack and cli.
Solution: After you uninstalling and reinstalling the latest webpack and cli, please run
ng serve
and it compiled successfully.To remove the webpack:
To install:
This was solved by uninstalling webpack. I then downloaded the 3.11.0 version.