question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RangeError on build step

See original GitHub issue

I get the follow errors on production (I am using next.js) when I run next build:

Failure loading font http://localhost:3000/models/digital-7-mono.ttf; trying fallback RangeError: Offset is outside the bounds of the DataView
    at DataView.getUint16 (<anonymous>)
    etc...

Failure loading font https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff RangeError: Offset is outside the bounds of the DataView
    at DataView.getUint16 (<anonymous>)
    etc...

When running next dev this error doesn’t come up.

-I am using troika-three-text via the drei <Text /> component. I found out this uses the preloadFont function as well, I am not sure that that is relevant, but just in case it is.

-Error happens both in Chrome and Safari.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

1reaction
max-ch9icommented, Sep 27, 2022

Here’s a reproducible example: https://stackblitz.com/edit/nextjs-fznkmq?file=package.json,next.config.js

I’ve narrowed it down to the options swcMinify and next version 12.3.1. Steps to reproduce:

  1. Set swcMinify: true in next.config.js.
  2. Run yarn && yarn next build && yarn next start.

The error is gone when swcMinify: false.

Another issue that manifested in different behaviours on prod and dev builds, which might be related, is https://github.com/pmndrs/react-three-fiber/issues/2533.

0reactions
vasco3commented, Nov 15, 2022

I’m seeing this issue in next.js 13.0.3 did anyone found a solution? it only happens in production. It runs fine in next dev

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maximum call stack size exceeded ' when run build · Issue ...
Then I detele some router. it build work. ... 'RangeError: Maximum call stack size exceeded ' when run build #3091 ... Steps to...
Read more >
RequireJS build error [RangeError: Maximum call stack size ...
I ran into this problem with requireJS 2.1.15. The problem seemed to be that the html extension was not part of the of...
Read more >
FAQ — Emscripten 3.1.26-git (dev) documentation
What is “No WebAssembly support found. Build with -sWASM=0 to target JavaScript instead” or “no native wasm support detected”?¶ ... Those errors indicate...
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
This error is a RangeError. A RangeError typically means an error has occurred outside of a code's argument value for its parameter. Now...
Read more >
RangeError: Maximum call stack size exceeded - Educative.io
In this shot, we will see how to fix the “RangeError: Maximum call stack size exceeded” error. ... The most common source for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found