We Are Going To Discuss About React native: Error “Unexpected identifier ‘_classCallCheck’.import call expects exactly one argument”. So lets Start this Android Article.
React native: Error “Unexpected identifier ‘_classCallCheck’.import call expects exactly one argument”
I had the same problem and the steps above didn’t work, so i update metro-react-native-babel-preset from 0.56.0 to 0.59.0 and it worked.
I had the same problem and the steps above didn’t work, so i update metro-react-native-babel-preset from 0.56.0 to 0.59.0 and it worked.
Solution 1
I had the same problem and the steps above didn’t work, so i update metro-react-native-babel-preset from 0.56.0 to 0.59.0 and it worked.
Original Author Pietro Paolo Of This Content
Solution 2
Thank God after days of work this silly issue resolved on my side
In my case it was babel, actually i removed the yarn.lock file and after a fresh yarn the babel version was updated so its creating this issue, so what i did i just revert the yarn.lock file and remove ( ^ ) from “@babel/core” version and did a yarn and then it works….
my current babel/core version is “@babel/core”: “7.12.9”,
i changed this
“@babel/core”: “^7.12.9”,
to this
“@babel/core”: “7.12.9”,
this issue also listed here
Original Author Arslan Bajwa Of This Content
Solution 3
"@babel/core": "7.12.0", // was "7.9.6"
"metro-react-native-babel-preset": "0.59.0", // was "0.58.0"
This helped me (RN 0.62.2)
Original Author Иван Иванов Of This Content
Solution 4
1.in your terminal enter:
npm ls metro-config
you will see your version of react-native need the version of metro-config
- change the version of these dependencies:
"metro": "^0.59.0",
"metro-core": "^0.59.0",
"metro-react-native-babel-preset": "^0.59.0",
- Clear watchman watches: watchman watch-del-all
- Delete node_modules and run yarn install
- Reset Metro’s cache by passing the –reset-cache flag, or adding
- resetCache: true to your metro configuration file.
- Remove the cache: rm -rf ${TMPDIR:-/tmp}/metro-*
- if necessary add
resetCache: true,
in your metro.config.js
Original Author leooooooo Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.