wix / react-native-calendars

React Native Calendar Components 🗓️ 📆
MIT License
9.55k stars 2.96k forks source link

Error: undefined Unable to resolve module ./agenda #2160

Open badgraphix opened 1 year ago

badgraphix commented 1 year ago

Please make our job easier by filling this template out to completion. If you're requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.

Description

I have added the react-native-calendars module to a React Native project using the following command npm install --save react-native-calendars

I go to a component that imports the react-native-calendars module and tries to render a object.

Expected Behavior

The Calendar component renders.

Observed Behavior

I get the following error:

error: Error: Unable to resolve module ./agenda from C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\react-native-calendars\src\index.js:

None of these files exist:
  * node_modules\react-native-calendars\src\agenda(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  * node_modules\react-native-calendars\src\agenda\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  1 | export {default as Calendar} from './calendar';
  2 | export {default as CalendarList} from './calendar-list';
> 3 | export {default as Agenda} from './agenda';
    |                                  ^
  4 | export {default as ExpandableCalendar} from './expandableCalendar';
  5 | export {default as AgendaList} from './expandableCalendar/agendaList';
  6 | export {default as Timeline} from './timeline/Timeline';
    at ModuleResolver.resolveDependency (C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:136:15)
    at DependencyGraph.resolveDependency (C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\metro\src\node-haste\DependencyGraph.js:231:43)
    at Object.resolve (C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\metro\src\lib\transformHelpers.js:129:24)
    at resolve (C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:396:33)
    at C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:412:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:411:33)
    at processModule (C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:140:31)
    at async addDependency (C:\Users\badgr\dev\AndroidStudioProjects\my_app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:230:18)
    at async Promise.all (index 0)

Environment

  1. Device/emulator/simulator & OS version: I'm running this through Android Studio and its emulator, on an emulated Pixel phone.
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Labalabadie commented 1 year ago

I have exact same error, didn´t find a solution yet

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

curtisyuen commented 4 months ago

Same error for me. Any advise to solving it please?