简体   繁体   中英

React-Native not importing folder

I'm trying to import everything from a directory in react native but it's giving me an error

error: bundling failed: Error: Unable to resolve module ../actions from F:\\INSTALLED\\React-Native\\crm\\components\\PeopleItem.js : The module ../actions could not be found from F:\\INSTALLED\\React-Native\\crm\\components\\PeopleItem.js . Indeed, none of these files exist:

However The folder name actions exists. Here is my 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'

Here is my Directory Structure 在此处输入图片说明

Index.js文件必须以小写字母“ i”命名,例如: index.js以便解释器可以将其正确解释为索引文件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM