Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6291

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

$
0
0

I am trying to 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. I'm trying my best to ensure it works on Snack, so that my project can be shared, please do help on how can I remove the error from showing up in Expo.

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

enter image description here

I have tried adding a tsconfig.json from the documentation, but to no avail.

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

Any help is appreciated, as I'm stuck on this for a few days, many thanks!


Viewing all articles
Browse latest Browse all 6291

Trending Articles