Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Module parse failed: Unexpected token Angular 14?

Tags:

angular

After ng build or ng serve I got this error:

./node_modules/ol/ol.css:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> .ol-box {
|   box-sizing: border-box;

I use Angular:

   "@angular/animations": "^14.0.0",
    "@angular/common": "^14.0.0",
    "@angular/compiler": "^14.0.0",
    "@angular/core": "^14.0.0"
like image 510
Araviz Avatar asked Jun 24 '26 01:06

Araviz


1 Answers

Add ol.css path inside angular.json styles array.

angular.json

"styles": ["node_modules/ol/ol.css"]

For More Info

like image 188
Chellappan வ Avatar answered Jun 26 '26 15:06

Chellappan வ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!