The property 'expo' cannot be used in this context app.json

I have created an app just with expo init. But when I open the project in visual studio code, the app.json gives me an error: The property ‘expo’ cannot be used in this context. So this is the standard template I haven’t changed anything yet. I have tried:

  1. npm install -g node
  2. npm install -g expo-cli
  3. delete the node modules and then created them again with npm install
  4. Checked the validity of my json

Still it doesn’t seam to solve my issues. Am I forgetting something?
Please help.

Can you try npx create-expo-app? Sounds like you might be using the older CLI

Hi Keith thank you for your suggestion, but still it doesn’t work. So I created the app using npx create-expo-app myappname. Please check the attachment. Am I missing something?

But if I run the code without opening vs code, it works and the app starts on the emulator.

Apologies for the late reply. I’m wondering if this is coming from some other Visual Studio Code plugin. You can try running npx expo-doctor, and if it reports no issues with your app.json, then it should be fine from Expo’s perspective.

1 Like

By the way, these days you should use npx create-expo-app or yarn create expo-app