无法解决模块从;React原生;。

问题描述 投票:0回答:2

我最近弹出了我的react native expo应用程序,我试图在我的ios模拟器上启动它,但当我做react-native run-ios时,我得到这个错误。enter image description here

这是我的RdvScreen.js代码。

import React from 'react';
import {View,Text,Button,StyleSheet,} from 'react-native'
import { ProgressSteps, ProgressStep } from 'react-native-progress-steps';

import Recap from './RécapitulatifScreen';
import MyComponent from '../Components/RadioButton';
import Identification from './IdentificationScreen';
class RDV extends React.Component {

    render(){
    return (
      <View style={styles.container}>

        <ProgressSteps>
            <ProgressStep label="Identification " nextBtnText="Suivant" >

                    <Identification />

            </ProgressStep>
        <ProgressStep label=" Motif" nextBtnText="Suivant" previousBtnText="Précédent" >
                <View style={{ alignItems: 'center' }}>
                    <MyComponent/>
                </View>
        </ProgressStep>
        <ProgressStep label="Récapitulatif" nextBtnText="Suivant" previousBtnText="Précédent" >
            <Recap/>
        </ProgressStep>
        <ProgressStep label="Confirmation" previousBtnText="Précédent" finishBtnText='Confirmer' onSubmit={()=> alert("Félicitation, votre rendez-vous est confirmé !")} >
            <View style={{ alignItems: 'center' }}>
                <Text>Confirmez votre rendez-vous</Text>
            </View>
        </ProgressStep>
    </ProgressSteps>
    </View>

    );
  }

}

这是我的项目路径。enter image description here

我将感谢你的帮助

reactjs xcode react-native ecmascript-6 expo
2个回答
1
投票

你需要修改两个文件。

screens -> RécapitulatifScreen改为RecapitulatifScreen。

打开屏幕文件夹下的RdvScreen.js,将第5行替换成

从'.RecapitulatifScreen'导入Recap。


0
投票

肯定是封装器的问题

蛮力解决方案

watchman watch-del-all && rm -rf node_modules/ && npm cache clean --force&& npm install && npm start -- --reset-cache

npx react-native start --reset-cache
© www.soinside.com 2019 - 2024. All rights reserved.