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 property 'length' of undefined w/ @rollup/plugin-commonjs v16 #16

Open
frederikhors opened this issue Oct 27, 2020 · 7 comments

Comments

@frederikhors
Copy link
Contributor

From "@rollup/plugin-commonjs": "16.0.0" this is the error:

[Nollup] Listening on http://localhost:5000
TypeError: Cannot read property 'length' of undefined
    at new MagicString (C:\svelte\node_modules\magic-string\dist\magic-string.cjs.js:354:34)
    at module.exports (C:\svelte\node_modules\nollup\lib\impl\ImportExportResolver.js:318:21)
    at compileModule (C:\svelte\node_modules\nollup\lib\impl\NollupCompiler.js:59:30)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async compileInputTarget (C:\svelte\node_modules\nollup\lib\impl\NollupCompiler.js:138:5)
    at async Object.compile (C:\svelte\node_modules\nollup\lib\impl\NollupCompiler.js:211:31)
    at async generateImpl (C:\svelte\node_modules\nollup\lib\index.js:13:21)

Reproduction here: https://github.com/frederikhors/svelte-template-hot/tree/update-commonjs-to-16

@rixo
Copy link
Owner

rixo commented Oct 27, 2020

OK thanks (for all your help around here, it's really appreciated & valuable). I'll investigate that.

@rixo
Copy link
Owner

rixo commented Nov 27, 2020

Confirmed on my side. This is between Nollup and @rollup/plugin-commonjs. I think the issue should be reported at Nollup, 'cause he's probably in the best position to understand what's going on.

I'm pinning @rollup/plugin-commonjs@15 in the template for now.

@frederikhors
Copy link
Contributor Author

Are you opening the issue on nollup describing what you think? Do you want?

@rixo
Copy link
Owner

rixo commented Nov 27, 2020

I'll do it eventually, but I'm swamped these days 😓 Go for it if you can ;)

@frederikhors
Copy link
Contributor Author

Done.

@frederikhors
Copy link
Contributor Author

Fixed in nollup 0.14.0.

@rixo
Copy link
Owner

rixo commented Nov 30, 2020

We should probably bump to last versions of Nollup and the commonjs plugin in the template now that this is fixed, before closing this issue.

@rixo rixo reopened this Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants