expo / expo-cli

Tools for creating, running, and deploying universal Expo and React Native apps
https://docs.expo.io/workflow/expo-cli/
2.61k stars 477 forks source link

[expo-doctor] Field: experiments - should NOT have additional property 'tsconfigPaths' #4739

Closed stefan-schweiger closed 9 months ago

stefan-schweiger commented 1 year ago

Summary

When running npx expo-doctor on a SKD49 project with Path Aliases (https://docs.expo.dev/guides/typescript/#path-aliases) enabled you get this error message:

Error: Problem validating fields in app.json. Learn more: https://docs.expo.dev/workflow/configuration/
 • Field: experiments - should NOT have additional property 'tsconfigPaths'.

Environment

expo-env-info 1.0.5 environment info: System: OS: macOS 13.4.1 Shell: 5.9 - /bin/zsh Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.15.1 - /usr/local/bin/npm Watchman: 2023.07.10.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.12.1 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4 IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild npmPackages: expo: ^49.0.3 => 48.0.19 react: 18.2.0 => 18.2.0 react-dom: 18.2.0 => 18.2.0 react-native: 0.72.3 => 0.71.8 react-native-web: ~0.19.6 => 0.18.12 npmGlobalPackages: eas-cli: 3.15.1 Expo Workflow: managed

Please specify your device/emulator/simulator platform, model and version

n/a

Error output

No response

Reproducible demo or steps to reproduce from a blank project

  1. Create blank project with npx create-expo-app -t expo-template-blank-typescript (make sure SDK49 is used)
  2. Add this to your app.json
    {
    "expo": {
    "experiments": {
      "tsconfigPaths": true
    }
    }
    }
  3. Run npx expo-doctor
byCedric commented 9 months ago

Hi @stefan-schweiger! As you mentioned, the tsconfigPaths was added since SDK 49. SDK 48 doesn't have this, and somehow that's exactly what expo-doctor has detected in your project:

image

If this is still an issue on your end, please open a new issue (with repro) on the expo/expo repository.

Hope this helps!