Error showing { expected css(css-lcurlyexpected) on vscode in CSS file

Viewed 15489
const URL = 'https://api.openweathermap.org/data/2.5/weather';
const API_KEY = 'f33a484cf794d08d0148764789aaba32';


<img className="city-icon" src={`https://openweathermap.org/img/wn/${weather.weather[0].icon}@2x.png`} alt={weather.weather[0].description} />
1 Answers

I got the same issue in my CSS file, that said the same: "{ expectedscss(css-lcurlyexpected)"

My CSS file contained this code: @import ‘@angular/material/prebuilt-themes/strongurstrongle-green.css’

Then I researched and recognized that the CSS file doesn't recognize ’ character. I replaced ’ character with ' character and it all started working.

This resolved my issue. Hope this helps you too.

Related