I am upgrading to Angular 6, but it looks like i get an error when running ng serve or ng build.
I do get the following error
Cannot destructure property 'createHash' of 'undefined' or 'null'. TypeError: Cannot destructure property 'createHash' of 'undefined' or 'null'. at Object. (C:\Users\stian\Source\Repos\minside\src\MinSide.Web\Areas\ClientApp\node_modules\mini-css-extract-plugin\dist\index.js:26:44)
I have been following the update guide https://update.angular.io/
It looks like it is webpack related, but if anyone know how to fix this or has experienced it themselves. Help is appreciated
First uninstall the existing Angular cli packages. Then run npm cache verify command to clear the node packages cache. Then install latest Angular CLI version using npm install -g @angular/cli@latest command.
Upgrade Angular CLI globally The Angular CLI is installed on global level as well as on project level. If you upgrade Angular CLI version inside Angular project then it shall update only project's Angular CLI version. The global Angular CLI version can be upgraded by removing previous version and installing newer one.
You need to update wepback
from ^4.1.0
to ^4.3.0
or ^4.4.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With