首页 文章

React-Native不导入文件夹

提问于
浏览
0

我正在尝试从反应原生的目录导入所有内容,但它给了我一个错误

错误:捆绑失败:错误:无法从F:\ INSTALLED \ React-Native \ crm \ components \ PeopleItem.js解析模块../actions:从F:\ INSTALLED \找不到模块../actions反应母语\ CRM \组件\ PeopleItem.js . 实际上,这些文件都不存在:

但是文件夹名称 actions 存在 . 这是我的 PeopleItem.js

import React from 'react'
import {
  StyleSheet,
  Text,
  View,
  image
} from 'react-native';
import { connect } from 'react-redux'
import {getTheme} from 'react-native-material-kit'
import icon from 'react-native-vector-icons/EvilIcons'
import * as actions from '../actions'

这是我的目录结构
enter image description here

1 回答

  • 5

    Index.js 文件必须使用小写'i'命名为: index.js 所以解释器可以将其正确解释为索引文件 .

相关问题