5-stones / react-native-readium

📚 📖 React Native ebook reader for iOS, Android, & Web via Readium
MIT License
83 stars 25 forks source link

issue while running latest exampleApp due to @babel/runtime/helpers/interopRequireDefault #40

Closed bilalshams7 closed 1 year ago

bilalshams7 commented 1 year ago

Could you please assist me in resolving an issue I encountered while attempting to run the Example app on Android using npm and yarn? Unfortunately, I'm currently facing an error message.

error: Error: Unable to resolve module @babel/runtime/helpers/interopRequireDefault from /Volumes/Data/WorkSpace/RNReadium/react-native-readium/src/components/ReadiumView.tsx: @babel/runtime/helpers/interopRequireDefault could not be found within the project or in these directories: ../../../../node_modules

1 | import React, { useCallback, useState, useRef, useEffect } from 'react'; 2 | import { View, Platform, findNodeHandle, StyleSheet } from 'react-native'; 3 | 4 | import type { BaseReadiumViewProps, Dimensions } from '../interfaces';

I have made several attempts to resolve the issue by trying different node versions, namely v14.20.1, v16.18.1, and v18.14.0. Despite multiple attempts, including deleting node modules, package.json, and yarn.lock files, clearing the cache, and adjusting the package version of @babel/runtime, I have been unable to successfully resolve the problem. Could you kindly assist me in finding a solution to this issue?

jspizziri commented 1 year ago

@bilalshams7 are you trying to use this project in a monorepo or something? This path doesn't make any sense to me unless you are ../../../../node_modules.

In any event, I'm not able to reproduce this, so there must be something wrong with your environment:

git clone git@github.com:5-stones/react-native-readium.git
cd react-native-readium
yarn install
yarn boostrap
yarn example start
yarn example ios