svelte-template-hot
svelte-template-hot copied to clipboard
TypeError: Cannot read property 'length' of undefined w/ @rollup/plugin-commonjs v16
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
OK thanks (for all your help around here, it's really appreciated & valuable). I'll investigate that.
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.
Are you opening the issue on nollup describing what you think? Do you want?
I'll do it eventually, but I'm swamped these days :sweat: Go for it if you can ;)
Done.
Fixed in nollup 0.14.0.
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.