My project was working fine. When I upgraded to Webpack 5 this issue occurred. I searched online, but all the discussions seem to be from a previous version and I even tried the workarounds specified, but to no avail.
\SourceCode\node_modules\webpack\node_modules\webpack-sources\lib\SizeOnlySource.js:26 throw this._error(); ^ Error: Content and Map of this Source is not available (only size() is supported)
Sometimes, such errors occur as a result of incorrect assembly. Most likely angular using a webpack just made changes with an error. Try to delete the .angular folder, then run the
npm install
command and run the project with the usual command:
ng serve --open
If there is an error, try clearing the cache, or running your IDE as administrator.
When I've disabled the sourceMap generation (for both local and prod configuration) the error no longer occured. Keep in mind this would work for some people, depends on the scenario. In my case I dont need sourceMaps even on local env:
I believe this problem is related somehow to Angular (as I have Angular project), and this might be something that they should address, instead of making changes on our angular.json file config.
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