[英]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
fromF:\\INSTALLED\\React-Native\\crm\\components\\PeopleItem.js
: The module../actions
could not be found fromF:\\INSTALLED\\React-Native\\crm\\components\\PeopleItem.js
.错误:捆绑失败:错误:无法解析模块
../actions
从F:\\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'
Index.js
文件必须以小写字母“ i”命名,例如: index.js
以便解释器可以将其正确解释为索引文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.