'Module build failed (from ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js)

the image of react app error

Tried running all of them:

npm install @babel/core @babel/preset-env npm install -D babel-loader @babel/core @babel/preset-env webpack npm install -D babel-loader @babel/core @babel/preset-env @babel/preset-react webpack npm install -D babel-loader@7 babel-core babel-preset-env babel-preset-react webpack npm install @babel/cli @babel/core @babel/node @babel/preset-env



Solution 1:[1]

Error seems clear, TinderCards is already declared. What is TinderCards.css exporting that you are importing? -import ./TinderCards.css maybe interpreted as importing TinderCards and so the babel parsing error. -Also, could you share contents of ur TinderCards.css file.

npmjs.com/package/Babel#methods This shows how Babel can help with different file formats, and your error shows that error is @babel/parser/lib... so there's error in parsing. I don't know more details of your files on all this but this may help.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sujant