Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

font failed to load (NextJs 15 - React 19 - R3F 9) #59

Open
aryankarim opened this issue Nov 6, 2024 · 3 comments
Open

font failed to load (NextJs 15 - React 19 - R3F 9) #59

aryankarim opened this issue Nov 6, 2024 · 3 comments

Comments

@aryankarim
Copy link

Seeing this:

Code generation for chunk item errored
An error occurred while generating the chunk item [project]/node_modules/r3f-perf/dist/roboto.woff.mjs [app-client] (ecmascript)

Caused by:
- failed to convert rope into string
- invalid utf-8 sequence of 1 bytes from index 11

Debug info:
- An error occurred while generating the chunk item [project]/node_modules/r3f-perf/dist/roboto.woff.mjs [app-client] (ecmascript)
- Execution of EcmascriptChunkItemContent::module_factory failed
- Execution of *fileify_source_map failed
- Execution of <ParseResultSourceMap as GenerateSourceMap>::generate_source_map failed
- Execution of SourceMap::with_resolved_sources failed
- failed to convert rope into string
- invalid utf-8 sequence of 1 bytes from index 11

Using the latest NextJs 15 with:

    "@react-three/postprocessing": "^2.16.3",
    "@react-three/drei": "^9.115.0",
    "@react-three/fiber": "^9.0.0-alpha.8",
    "next": "15.0.2",
    "react": "19.0.0-rc-02c0e824-20241028",
    "react-dom": "19.0.0-rc-02c0e824-20241028",
    "three": "^0.170.0",
    "r3f-perf": "^7.2.2"
@nyvid
Copy link

nyvid commented Jan 13, 2025

It happens only with turbopack enabled, removing it works again for me

@DennisSmolek
Copy link

This is also in 14.2

From what I can tell, Turbo is treating the .mjs as a module and tries to load it as Javascript where it encouters a Binary Woff file.

disabling turbo works as it uses webpack, but turbo is WAY faster.

@DennisSmolek
Copy link

I was wrong. Turbo is trying to do something with UTF-8 and not parsing it as a module or something so it's failing. I've opened an issue over there.

They are super slow so if theres a way we could resolve it in this package that would be huge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants