如何修复“无法解决的模块博览会模块在急速模块图中不存在”

时间:2019-01-27 01:49:39

标签: react-native expo

我正在开发一个本机应用程序,我用

创建了我的项目
react-native init MyApp

我导入了LinearGradient

import { LinearGradient } from 'expo'

我收到此错误:

unable to resolve from "/Project/Nav/App.js". 
Module expo module does not exist in the haste module map

我试图删除node_modules文件夹并再次安装所有软件包,但错误仍然存​​在,我也清理了ios build文件夹,但再次出现相同的错误

1 个答案:

答案 0 :(得分:1)

使用

创建项目时,您没有使用expo
`react-native init MyApp`  

expo cli命令是

`expo init MyApp` 

确保已在全球范围内安装EXPO

npm install -g expo-cli
相关问题