Comment react native and react js issue: Cannot find @babel/types

By medeb | personalblog | 8 Jul 2023


Hello,

You may when doing one of these commands face issue:

npx create-react-app AwesomeProject

npx react-native init AwesomeProject

Step 1:

Installing babel libraries:

npm install --save-dev @babel/core @babel/cli

npm install @babel/preset-env --save-dev

npm install @babel/types --save-dev

Step 2:

Do not use latest tag:

Sometimes using

npx create-react-app@latest AwesomeProject

npx react-native init@latest AwesomeProject

Then latest doesn't match your current version of Node.
Then remove the latest tag from the installation.

It will install create-react-app or react-native adequate to your version.

Because even you have installed babel js libraries it stills facing issue like cannot find type './route' and series or branch of errors even after installing babel for bypass the issue.

9d44c5d6563128b257a640338fe0a1d4dfb7a1e9bde49dfefcd268cd71cbc709.png

How do you rate this article?

1



personalblog
personalblog

My daily experience in crypto world

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.