expo / vscode-expo

Expo Tools keep you productive with debugging, IntelliSense, and prebuild previews
https://marketplace.visualstudio.com/items?itemName=expo.vscode-expo-tools
MIT License
433 stars 11 forks source link

Unable to load schema from path/to/manifest.json #164

Closed SleeplessByte closed 1 year ago

SleeplessByte commented 1 year ago

Description of the bug

Recently app.json has no longer been able to load the manifest. This is also on a fresh machine that never had the extension, so I am certain it's not due to cache poisoning.

To Reproduce

What steps did you perform which led to this issue?

  1. Install the extension
  2. npx create-react-app
  3. open app.json

Expected behavior

There are no warnings or errors

Actual behavior

Unable to load schema from 'c:\Users\Derk-Jan\AppData\Roaming\Code\User\globalStorage\bycedric.vscode-expo\manifest-43.0.0.json': 
ENOENT: no such file or directory, open 'c:\Users\Derk-Jan\AppData\Roaming\Code\User\globalStorage\bycedric.vscode-expo\manifest-43.0.0.json'.(768)

Additional context

I'm on windows, which could have been deducted from the file path.

There is no folder bycedric.vscode-expo inside c:\Users\Derk-Jan\AppData\Roaming\Code\User\globalStorage, or anywhere else in the filetree.

byCedric commented 1 year ago

Hi @SleeplessByte! Could it be possible that your settings.json/vscode settings still has deprecated json.schemas settings for Expo? If so, please remove that json.schemas item manually.

SleeplessByte commented 1 year ago

@byCedric Yes, that's definitely possible as I sync settings.

After removing it manually from the settings the problem goes away.

My recommendation would be to document this in the README.md at a minimum. For future changes like this, you may want to offer a migration option, or explicitly remove the value from people their settings. This is possible by passing undefined to the update command, although I don't know what the correct syntax would be for changing an array.