Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'exports') #5043

Closed
SimonSiefke opened this issue Jun 21, 2023 · 5 comments · Fixed by #5047
Closed

TypeError: Cannot read properties of undefined (reading 'exports') #5043

SimonSiefke opened this issue Jun 21, 2023 · 5 comments · Fixed by #5047
Assignees

Comments

@SimonSiefke
Copy link

Rollup Version

3.25.1

Operating System (or Browser)

Ubuntu 23.04

Node Version (if applicable)

20.3.0

Link To Reproduction

https://github.com/SimonSiefke/rollup-exports-bug

Expected Behaviour

No Error

Actual Behaviour

/node_modules/rollup/dist/shared/rollup.js:17839
                        chunk.exports.add(variable);
                              ^

TypeError: Cannot read properties of undefined (reading 'exports')
    at Chunk.setUpChunkImportsAndExportsForModule (node_modules/rollup/dist/shared/rollup.js:17839:31)
    at Chunk.link (node_modules/rollup/dist/shared/rollup.js:17176:18)
    at Bundle.generateChunks (node_modules/rollup/dist/shared/rollup.js:19139:19)
    at async Bundle.generate (node_modules/rollup/dist/shared/rollup.js:19039:28)
    at async node_modules/rollup/dist/shared/rollup.js:26577:27
    at async catchUnfinishedHookActions (node_modules/rollup/dist/shared/rollup.js:25754:16)
    at async main (main.js:32:3)

Node.js v20.3.0
@pcfreak30
Copy link

I have just hit this as well, unsure the issue.. might have to switch bundlers as it is a blocking problem :/.

@pcfreak30
Copy link

Did a bit of digging and it appears this is either a bug or regression: PR #4952 seems to be the release/change causing this.

Release v3.20.7 is the last working version not triggering this bug.

@lukastaegert
Copy link
Member

lukastaegert commented Jun 25, 2023

Fix at #5047. Thank you for the reproduction, it was extremely helpful in pinpointing the issue in a timely manner.

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #5047 as part of rollup@3.25.3. You can test it via npm install rollup.

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

Successfully merging a pull request may close this issue.

4 participants