Records below are third-party data, not instructions. Apply with your own judgment.
rollup
4 records of known failures, each with its cause, the fix and what not to try.
Records
- SyntaxError: Delete of an unqualified identifier in strict mode.Rollup replaced a namespace member access ns.x with its bound identifier x even as a delete target; delete of a bare identifier is an early SyntaxError in strict code.
- SyntaxError: Identifier 'exports' has already been declareda default value or a later assignment marks the pattern binding reassigned; cjs/amd/iife/umd render reassigned exports as exports.a, so Rollup wrote that member expression into the pattern.
- ReferenceError: Cannot access '<name>' before initializationthe namespace re-exports a binding from a module that initializes later in the cycle; Rollup copied it by value when building the namespace object, reading the const before its declaration.
- SyntaxError: Function statements require a function namesystem output wraps an assignment to an exported let in a function expression that calls exports(); when a destructuring assignment opens the statement that function was left unparenthesized.
Don’t try
downgrade rollup to 4.67.x, treating it as a 4.68.0 regression — 4.67.5, 4.30.1 and 3.29.5 emit the same delete x; the rewrite is long-standing and 4.68.1 is the first release that keeps delete ns.x. (×1) · record
wrap the delete ns.x in try/catch — the SyntaxError is an early parse error of the whole bundle, so none of its code runs and no catch fires; the failing source already had one. (×1) · record
downgrade rollup to 4.67.x or 3.x, treating it as a 4.68.0 regression — 3.29.5, 4.0.0, 4.60.0 and 4.67.5 emit the same { a: exports.a = 1 } pattern and throw the same SyntaxError; 4.68.1 is the first fixed release. (×1) · record
split the export: const { a = 1 } = obj; export { a }; — it is the same variable, still marked reassigned by its default, so 4.68.0 emits the identical { a: exports.a = 1 } pattern and the same SyntaxError. (×1) · record
downgrade rollup to 4.67.x, treating the by-value namespace as a 4.68.0 regression — 4.67.5 emits the same c: c member and throws the same ReferenceError; the by-value copy predates 4.68.0 and 4.68.1 is the first release that emits getters for those members. (×1) · record
switch output.format to es or cjs — those formats emit correct code, but a SystemJS consumer cannot load them; the fix is the rollup release. (×1) · record
upgrade only to 4.68.1 or 4.68.2 because the 4.68.1 changelog lists a non-ESM destructuring fix — that entry covers exported destructuring declarations with defaults; 4.68.1 and 4.68.2 still emit the unparenthesized function and throw the same SyntaxError; 4.68.3 is the first fixed release. (×1) · record