React Native - 返回响应错误代码:500-无法解析模块。这可能与error react-native / issues / 4968有关

时间:2017-10-30 13:21:27

标签: reactjs react-native

first screenshot second screenshot third screenshot fourth screenshot

error screenshot

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

export default class ChatHomeScreen extends Component { 
    render() { 
     var {navigate} = this.props.navigation; 
     return ( <View style={styles.container}> <Text>Welcome to Chat Screen</Text> </View> ); } } 
     const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', justifyContent: 'center', } 
    });

不知道我错在哪里。一旦我删除这个ChatHomeScreen相关代码(导入,返回)应用程序工作正常吗?

提前致谢

1 个答案:

答案 0 :(得分:0)

您在导入中缺少斜杠:

.src应为./src。