close

[Solved] You gave us a visitor for the node type TSInstantiationExpression but it’s not a valid type

I am trying to run my project I am facing the following error with expo and bablejs: You gave us a visitor for the node type TSInstantiationExpression but it’s not a valid type. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.

How You gave us a visitor for the node type TSInstantiationExpression but it’s not a valid type Error Occurs?

I am trying to run my project I am facing the following error with expo and bablejs:

You gave us a visitor for the node type TSInstantiationExpression but it's not a valid type

So here I am writing all the possible solutions that I have tried to resolve this error.

How To Solve You gave us a visitor for the node type TSInstantiationExpression but it’s not a valid type Error?

  1. How To Solve You gave us a visitor for the node type TSInstantiationExpression but it’s not a valid type Error?

    To Solve You gave us a visitor for the node type TSInstantiationExpression but it’s not a valid type Error Just run this command to upgrade expo-cli: yarn global add expo-cli I hope your error may be solved now.

  2. You gave us a visitor for the node type TSInstantiationExpression but it’s not a valid type

    To Solve You gave us a visitor for the node type TSInstantiationExpression but it’s not a valid type Error First of all delete node_modules folder and then delete yarn.lock file and then you can run yarm fixed my issue. Just run following command. To delete node modules folder use this command: rm -rf node_modules and then delete yarn.lock file and run yarn: rm yarn.lock && yarn Or you can simply run this command: rm -rf ./node_modules && rm yarn.lock && yarn Now, your error may be solved. Thanks.

Solution 1: delete node_modules

First of all delete node_modules folder and then delete yarn.lock file and then you can run yarm fixed my issue. Just run following command.

To delete node modules folder use this command:

rm -rf node_modules 

and then delete yarn.lock file and run yarn.

rm yarn.lock && yarn

Or you can simply run this command:

rm -rf ./node_modules && rm yarn.lock && yarn

Now, your error may be solved. Thanks.

Solution 2: Update expo-cli 

Just run this command to upgrade expo-cli

yarn global add expo-cli

I hope your error may be solved now.

Conclusion

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment