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

error TS2305: Module '"react"' has no exported member 'Node'

$
0
0

I ran the React Native project along with the official documentation and added TypeScript to the project.Many ESlint errors occurred when I was executing 'yarn tsc', for example:

App.tsx:10:14 - error TS2305: Module '"react"' has no exported member 'Node'.10 import type {Node} from 'react';

I know this is just an TS error, but I am confused, why does the code, 'import type {Node} from 'react';', produce this error

tsconfig.json:

{"compilerOptions": {"allowJs": true,"allowSyntheticDefaultImports": true,"esModuleInterop": true,"isolatedModules": true,"jsx": "react-native","lib": ["es2017"],"moduleResolution": "node","noEmit": true,"strict": true,"target": "esnext"  },"exclude": ["node_modules","babel.config.js","metro.config.js","jest.config.js"  ]}

Viewing all articles
Browse latest Browse all 6287

Trending Articles



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