Skip to content

TypeError: Cannot read properties of null (reading 'render') #5480

@elchininet

Description

@elchininet

Rollup Version

4.16.0

Operating System (or Browser)

Ubuntu 20.04.6 LTS / MacOS Sonoma 14.4.1

Node Version (if applicable)

18.20.2

Link To Reproduction

elchininet/shadow-dom-selector#55

Expected Behaviour

Build should success as it succeeded on previous versions.

Actual Behaviour

Build fails with an error coming from ConditionalExpression.render:

at ConditionalExpression.render (/xxx/node_modules/rollup/dist/shared/rollup.js:11185:24)
    at VariableDeclarator.render (/xxx/node_modules/rollup/dist/shared/rollup.js:12038:18)
    at VariableDeclaration.render (/xxx/node_modules/rollup/dist/shared/rollup.js:13724:28)
    at renderStatementList (/xxx/node_modules/rollup/dist/shared/rollup.js:9106:25)
    at BlockStatement.render (/xxx/node_modules/rollup/dist/shared/rollup.js:9272:13)
    at FunctionDeclaration.render (/xxx/node_modules/rollup/dist/shared/rollup.js:6348:23)
    at ExportNamedDeclaration.render (/xxx/node_modules/rollup/dist/shared/rollup.js:11436:30)
    at renderStatementList (/xxx/node_modules/rollup/dist/shared/rollup.js:9095:35)
    at Program.render (/xxx/node_modules/rollup/dist/shared/rollup.js:12880:13)
    at Module.render (/xxx/node_modules/rollup/dist/shared/rollup.js:15641:18)

I tried to reproduce it in Repl without success, but seeing that it is coming from ConditionalExpression.render that was recently refactored this could give a clue to the devs.

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