Skip to content

RollupError: called Option::unwrap() on a None value with Rollup >=4.53 #6176

@kernoeb

Description

@kernoeb

Rollup Version

4.53.1

Operating System (or Browser)

macOS, browser (wasm)

Link To Reproduction

https://stackblitz.com/edit/rollup-repro-1zwsfca2

(The bug is a bit more opaque on wasm version)

Expected Behaviour

Build should work
It works with rollup 4.52

Actual Behaviour

Here's the error i get when running npm run build (npx rollup index.js --file bundle.js --format esm --plugin @rollup/plugin-node-resolve --plugin @rollup/plugin-commonjs).

I got the issue in my Vite.js project, and found the error was in Rollup, not Vite.

thread '<unnamed>' panicked at <redacted>:0:0:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[!] RollupError: called `Option::unwrap()` on a `None` value (Note that you need plugins to import files that are not JavaScript)
node_modules/number-flow/dist/lite-BTIaQdTe.mjs
    at Object.getRollupError (/private/tmp/tests/node_modules/rollup/dist/shared/parseAst.js:285:41)

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