Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

fix RangeError: Maximum call stack size exceeded in wrangler local mode #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

llindemann
Copy link

When running wrangler in local mode, the following error is triggered:

[mf:err] /Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/shared/dist/src/index.js:52
getRequestContext: () => getRequestContext,
^

RangeError: Maximum call stack size exceeded
at Object.getRequestContext (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/shared/src/index.ts:1:1)
at Object.get [as getRequestContext] (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/core/dist/src/index.js:18:52)
at Function.requestContextNow (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/core/src/standards/date.ts:5:10)
at Function.requestContextNow (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/core/src/standards/date.ts:5:51)
at Function.requestContextNow (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/core/src/standards/date.ts:5:51)
at Function.requestContextNow (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/core/src/standards/date.ts:5:51)
at Function.requestContextNow (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/core/src/standards/date.ts:5:51)
at Function.requestContextNow (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/core/src/standards/date.ts:5:51)
at Function.requestContextNow (/Users/lionel/.npm/_npx/32026684e21afda6/node_modules/@miniflare/core/src/standards/date.ts:5:51)
✘ [ERROR] Miniflare process exited with code 1

Miniflare process exited with code 1

Replacing the ./polyfill_performance.js import by globalThis.performance.now = Date.now fixes the error

@syumai
Copy link
Owner

syumai commented Feb 27, 2023

I'm sorry for being late in replying to your message. I couldn't reproduce this problem, is there a code that reproduces it?

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

Successfully merging this pull request may close these issues.

None yet

2 participants