TransWikia.com

Module '"./node_modules/react-native"' has no exported member 'View'

Stack Overflow Asked by javed on January 29, 2021

After i convert my project in typescript showing me following error
Module ‘"./node_modules/react-native"’ has no exported member ‘View’.

import React from 'react';
import {StyleSheet,View,Text} from 'react-native';

export default function App() {
return (
  <View style={{ flex: 1 }}>
    <Text>Welcome</Text>
  </View>
 );
}

One Answer

Delete node_modules folder and run npm install or yarn again.

If it not solve this problem, try to run npm install @types/react @types/react-native or yarn add @types/react @types/react-native

Answered by DinhNguyen on January 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP