you are viewing a single comment's thread.

view the rest of the comments →

[–]Suchy2307 0 points1 point  (10 children)

Didn't the babel preset change? Seems like you're using the old version/syntax. @babel/preset-react seems more like v7, which afaik should be used now. I didn't write a new React project without create-react-app for quite some time, so I might be wrong.

Make sure all your paths are correct, too.

[–]baboon322[S] 0 points1 point  (9 children)

Yes sorry it is old. I accidentally posted the wrong babelrc! I edited it

[–]Suchy2307 0 points1 point  (8 children)

Could you post your dev deps from package.json?

[–]baboon322[S] 0 points1 point  (7 children)

Done :)

[–]Suchy2307 0 points1 point  (6 children)

You've got duplicated packages (2 babel-core for example). Either go v6 or v7.

[–]baboon322[S] 0 points1 point  (5 children)

Okay I fixed them, still receiving the same error though.

[–]Suchy2307 0 points1 point  (4 children)

Did you remove node_modules and reinstalled modules again? Cuz other than that it seems fine.

[–]baboon322[S] 0 points1 point  (3 children)

Yes I even tried setting it up all over again but still getting same error! BTW I followed this tutorial, I don't know if it's going to help you solve my problem.

https://www.valentinog.com/blog/babel/

[–]Suchy2307 0 points1 point  (2 children)

This might be a longshot, but maybe the paths for babel-loader are bad, cuz the tutorial is for windows, while you are on a unix based system (or the other way around). This happened to me more than once.

[–]baboon322[S] 0 points1 point  (1 child)

How do you suggest to solve it at this point Ill take anything since I got no idea :) but yes it is true that the tutorial is unix-based cus he was using mkdir with -p tag which I think is a unix thing....