我是反应原生的新手。导入 react-native-calendar-picker 后出现以下错误:
ERROR [Error: InternalError Metro has encountered an error: While trying to resolve module `react-native-calendar-picker` from file `C:\Users\Name\Project\app\App\Components\DatePickerPopup\index.js`, the package `C:\Users\Name\Project\app\node_modules\react-native-calendar-picker\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`C:\Users\Name\Project\app\node_modules\react-native-calendar-picker\CalendarPicker`. Indeed, none of these files exist:
* C:\Users\Name\Project\app\node_modules\react-native-calendar-picker\CalendarPicker(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg)
* C:\Users\Name\Project\app\node_modules\react-native-calendar-picker\CalendarPicker\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg): C:\Users\name\Project\app\node_modules\metro\src\node-haste\DependencyGraph.js (376:17)
374 |
375 | if (error instanceof InvalidPackageError) {
> 376 | throw new PackageResolutionError({
| ^
377 | packageError: error,
378 | originModulePath: from,
379 | targetModuleName: to]