首页 > 解决方案 > 已安装库但在 react-native 环境中不起作用

问题描述

每当我安装库时,无论是原生基础还是反应原生文本输入效果。它每次都会给出相同的错误。我不知道是什么导致了这里的问题。

 error: bundling failed: Error: While trying to resolve module 
native-base`   from file `/home/jas/Hopper/screen/Home.js`, the package ` 
/home/jas/Hopper /node_modules/native-base/package.json` was successfully 
found. However, this package itself specifies a `main` module field that  
could not be resolved (`/home/jas/Hopper/node_modules/native-base/dist
/src/index.js`. Indeed, none of these files exist:

标签: react-nativenative-base

解决方案


删除 /node_modules/native-base/android/app 中的构建文件夹


推荐阅读