Skip to content

Upgrade from vite 4 to vite 5 crashes in rollup with maximum call stack exceeded #5499

@benasher44

Description

@benasher44

Rollup Version

4.17.0

Operating System (or Browser)

macOS

Node Version (if applicable)

20.11.1

Link To Reproduction

https://github.com/benasher44/vite-stack-exceeded-repro

run npm install && npm run build

Expected Behaviour

vite 5 production build works

Actual Behaviour

We get this crash

vite v5.2.10 building for production...
✓ 133 modules transformed.
x Build failed in 405ms
error during build:
RangeError: Maximum call stack size exceeded
    at ParameterVariable.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:7219:34)
    at Identifier.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:6985:53)
    at ParameterVariable.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:7224:27)
    at Identifier.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:6985:53)
    at ParameterVariable.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:7224:27)
    at Identifier.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:6985:53)
    at ParameterVariable.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:7224:27)
    at Identifier.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:6985:53)
    at ParameterVariable.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:7224:27)
    at Identifier.hasEffectsOnInteractionAtPath (file:///Users/basher/code/stack-exceeded-repro/node_modules/rollup/dist/es/shared/node-entry.js:6985:53)

I'd love some pointers on how to determine what part of our code might have triggered this figured out a repro!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions