snack icon indicating copy to clipboard operation
snack copied to clipboard

In Expo Snack, I have configured tsconfig, but still receiving, 'Cannot find module or its corresponding type declarations.(2307)' during json import

Open dineshgupta630 opened this issue 2 years ago • 0 comments

Summary

I am trying to learn React/React Native, and use Typescript, in React Native. This code works on my local but on Expo Snack,

Cannot find module './constants/theme/dark.json' or its corresponding type declarations.(2307)

Here's a link to my Expo -> https://snack.expo.dev/@dineshgupta630/quiet-crackers

image

My tsconfig.json

{  
  "extends": "expo/tsconfig.base",
  "compilerOptions": {
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "jsx": "react-native",
    "lib": ["dom", "esnext"],
    "moduleResolution": "node",
    "noEmit": true,
    "skipLibCheck": true
  }
}

What am I doing wrong or is this a bug?

What platform(s) does this occur on?

Android, iOS

SDK Version

47.0.0.1

Reproducible demo or steps to reproduce from a blank project

https://snack.expo.dev/@dineshgupta630/quiet-crackers

dineshgupta630 avatar Feb 23 '23 14:02 dineshgupta630