简体   繁体   English

React-Native不导入文件夹

[英]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 . 错误:捆绑失败:错误:无法解析模块../actionsF:\\INSTALLED\\React-Native\\crm\\components\\PeopleItem.js :模块../actions无法从发现F:\\INSTALLED\\React-Native\\crm\\components\\PeopleItem.js Indeed, none of these files exist: 实际上,这些文件都不存在:

However The folder name actions exists. 但是,存在文件夹名称actions Here is my PeopleItem.js 这是我的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以便解释器可以将其正确解释为索引文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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