I'm having trouble with the compilation of my React project. While everything runs smoothly with npm start, I encounter an error during compilation:
npm run build
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ee8f8d9a8798879a97c3888b8b8aaedec0dfc0de">[email protected]</a> build
> react-app-rewired --openssl-legacy-provider build
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
Browserslist: caniuse-lite is outdated. Please run the following command: `yarn upgrade`
Browserslist: caniuse-lite is outdated. Please run the following command: `yarn upgrade`
Failed to compile.
./src/HubView.scss
ParserError: Syntax Error at line: 1, column 22
Can anyone suggest a solution for successfully compiling my project? Here's a snippet from my SCSS file:
.HubView {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
--margin: 16px;
margin: var(--margin);
}
.HubView__title {
grid-column: 1 / span 2;
font-weight: bold;
font-size: 32px;
line-height: 36px;
letter-spacing: -1.28px;
}
(HubView__entity-card {
....more code snippets...
}