小编Jog*_*kki的帖子

但是,这个包本身指定了一个无法解析的`main`模块字段

我是 react-native 的新手,但不是 ReactJs 我从 2 天起就会对这个错误感到生气

error: bundling failed: Error: While trying to resolve module `@react-navigation/native` from file `C:\XXXXX\Example\src\Router.jsx`, the package `C:\XXXXX\Example\node_modules\@react-navigation\native\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`C:\XXXXX\Example\node_modules\@react-navigation\native\src\index.tsx`. Indeed, none of these files exist:

error: bundling failed: Error: While trying to resolve module `react-native-safe-area-context` from file `C:\XXXXX\Example\App.js`, the package `C:\XXXXX\Example\node_modules\react-native-safe-area-context\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved …
Run Code Online (Sandbox Code Playgroud)

react-native react-navigation

17
推荐指数
5
解决办法
2万
查看次数

标签 统计

react-native ×1

react-navigation ×1