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

Typescript - App.tsx is not under rootDir

$
0
0

I have just installed typescript for my react-native project and when I run the project, the following error message is displayed in the packager:

error: bundling failed: Error: File'/Users/user/React/Test/src/App.tsx' is not under'rootDir''./src'. 'rootDir' is expected to contain all source files.

I have deleted the App.js file from the root of my project and I have created a new App.tsx in src/App.tsx so I cannot understand why is this happening.

My tsconfig.json file

{"compilerOptions": {"target": "es6","module": "commonjs","moduleResolution": "node","jsx": "react","outDir": "./dist","rootDir": "./src","experimentalDecorators": true,"emitDecoratorMetadata": true,"allowSyntheticDefaultImports": true,"strict": true,"skipLibCheck": true,"declaration": true,"noUnusedLocals": true    },"exclude": ["node_modules","dist","__tests__"    ]  }

Viewing all articles
Browse latest Browse all 6295

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>