gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.

Home Page:https://www.gatsbyjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleParseError: Module parse failed: Unexpected character '@' (2:0) after upgrading gatsby to v5

hermeshcg opened this issue · comments

Preliminary Checks

Description

Hello everyone, i'm working on a project where i had to upgrade the gatsby version from 4.x to 5.x, after i upgraded all the necessary libs, the project stopped building when running npm run develop, presenting a error indicating something related to scss, as seen bellow.
imagem_2024-02-08_133153682

The project uses gatsby, typescript and scss.
The image bellow is the indicated file, quite usual for scss projects
image

I've already installed gatsby-plugin-scss and gatsby-plugin-scss-typescript, but neither worked as expected.

Reproduction Link

https://githubbox.com/gatsbyjs/gatsby-starter-minimal

Steps to Reproduce

Not sure if it's reproducible

Expected Result

Build as expected.

Actual Result

image

Environment

OS: macOS ventura 13

Node: 18
npm: 8.19.2

Languages: Typescript, SASS

npm Packages:

"@amplitude/analytics-browser": "^2.3.8",
"@fortawesome/free-brands-svg-icons": "^6.5.1",
"@fortawesome/pro-regular-svg-icons": "^6.5.1",
"@gatsbyjs/reach-router": "^2.0.1",
"@novaescola/eva-react-v2": "bitbucket:novaescola/eva-react-v2#v3.15.1",
"algoliasearch": "^4.14.2",
"axios": "^1.6.5",
"css-loader": "^6.10.0",
"gatsby": "^5.13.3",
"gatsby-link": "^4.25.0",
"gatsby-plugin-anchor-links": "^1.2.1",
"gatsby-plugin-google-analytics": "^5.13.0",
"gatsby-plugin-google-gtag": "^5.13.0",
"gatsby-plugin-google-tagmanager": "^5.13.0",
"gatsby-plugin-image": "^3.13.0",
"gatsby-plugin-manifest": "^5.13.0",
"gatsby-plugin-purgecss": "^6.2.1",
"gatsby-plugin-react-helmet": "^6.13.0",
"gatsby-plugin-s3": "^0.4.1",
"gatsby-plugin-sass": "^6.13.0",
"gatsby-plugin-sharp": "^5.13.0",
"gatsby-plugin-sitemap": "^6.13.0",
"gatsby-react-router-scroll": "^6.13.1",
"gatsby-script": "^2.13.0",
"gatsby-source-filesystem": "^5.12.0",
"gatsby-transformer-sharp": "^5.13.0",
"js-cookie": "^3.0.1",
"less-loader": "^12.2.0",
"react": "^18.2.0",
"react-device-detect": "^2.1.2",
"react-dom": "^18.2.0",
"react-ga": "^3.3.0",
"react-h5-audio-player": "^3.8.6",
"react-helmet": "^6.1.0",
"react-instantsearch-dom": "^6.32.1",
"react-instantsearch-hooks-web": "^6.32.1",
"react-popper-tooltip": "^4.4.2",
"react-share": "^5.0.3",
"sass": "^1.59.9",
"style-loader": "^3.3.4",
"swiper": "^8.4.1"

Config Flags

No flags used

Error was unrelated to gatsby