Reputation: 139
I have upgraded from angular 12 to angular 13. Now after upgrading when I tries to run my application. It runs perfectly but in console it is getting the error.
index.js:37 Uncaught TypeError: __webpack_require__.h is not a function
at Module.38202 (index.js:37:58)
at __webpack_require__ (bootstrap:19:1)
at __webpack_exec__ (styles.css?231c:1:1)
at styles.css?231c:1:1
at webpackJsonpCallback (jsonp chunk loading:71:1)
at styles.js:1:109
Can anyone help me to resolve this error.
Upvotes: 8
Views: 8159
Reputation: 1401
Had the same issue, deleted .angular
folder and node_modules
folder. Reinstalled the packages npm i
.
And the important part is to clear the cache in your browser. Open dev-tools F12
and RIGHT-click on the reload icon (circle arrow) --> empty cache and hard reload
.
After that it worked for me.
Upvotes: 5
Reputation: 387
Came here looking for answers, but what fixed this issue for me was changing the port I was serving from. Something somewhere was caching an old version of the site.
To clarify a little bit further, I have a .NET Core server that proxy serves my Angular client locally. Changing the .NET Core server from 44316 to 44319 solved everything.
And yes, I did try clearing my browser/application caches and tried other browsers even.
Upvotes: 0
Reputation: 70
Deleting the contents of my compiled JavaScript output directory (dist/ is default) before rebuilding the Angular/TypeScript files solved the issue for me.
I had the same issue developing an Angular/ASP.NET Core site and it was preventing IISExpress from serving updated files as well as hot reloading (very annoying during development).
Upvotes: 5