Comments (12)
@gabrielaRazo In the project where this is happening, ensure react is installed as a dependency
from react-reader.
have the same issue, was on nextjs 14
from react-reader.
@jordant97 Would you create a sample-repo?
from react-reader.
My bad, got it working following #125
from react-reader.
@jordant97 Great to hear, then I close this again
from react-reader.
I'm getting this error after upgrading to 2.0.4. I'm not sure how jordant97 used #125 to solve it. Adding a height and width to the component's parent element didn't help.
from react-reader.
I'm using react v18.2.0 and next v14.1.0
from react-reader.
@robyn3choi Can you make a test repo where this happen?
from react-reader.
Sure, here's a test repo - https://github.com/robyn3choi/react-reader-bug. Running yarn dev
and going to localhost:3000 will result in that error.
from react-reader.
@robyn3choi Try to upgrade to npm i [email protected]
and change your code to: (you need a height/width for parent element)
<main className="h-screen w-screen">
<ReactReader
url="https://react-reader.metabits.no/files/alice.epub"
location={location}
locationChanged={setLocation}
/>
</main>
The problem was that react-reader's package also need to have and exports
field and NextJS was not able to load the es-module with the module
field
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/react-reader.es.js"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/react-reader.umd.js"
}
}
},
from react-reader.
Thanks, it's working for me now!
from react-reader.
Great!
from react-reader.
Related Issues (20)
- Text Selection is very fast HOT 2
- Total pages is wrong on reload HOT 1
- in vertical Scroll view : when I click any section in TOC it 1st open that section and in next second it scrolled to end of that section. same happens When I pass externally epubcfi of the start of the section. HOT 6
- Cen we get Input from interactive epub to save it to backend DB? HOT 2
- How to navigation to spesfic page ? HOT 2
- How to know the reading percentage of the book? HOT 1
- Add custom options on text selection HOT 4
- How to use with file input: URL. createObjectURL HOT 2
- Can AVIF supported by epubjs and epub by any means. any hint? HOT 1
- Reader only shows cover HOT 1
- The percentage in location does not update if you change location from TOC too fast HOT 1
- [Issue] Only cover page rendered for certain epub, rendering a different epub fixes it HOT 3
- Prefetch Next Page. HOT 1
- Can I customize it to full screen? HOT 1
- Customize Default Icon (PrevArrow, NextArrow, TOCToggleIcon... etc) HOT 1
- Is there a way to add animations to page changes? HOT 1
- Adjusting to window/container size happening only on chapter change HOT 3
- clickable highlights HOT 1
- Overriding Reader Fonts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-reader.