-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 'dependencies' of undefined #961
Comments
Thanks — this is a fun bug. When Svelte walks the template, it does so with estree-walker, which builds up a map of child keys for each node type (e.g. an |
prevent boolean attributes breaking shapes inside estree-walker
Awesome! Thanks Rich! |
[email protected]
throwsTypeError: Cannot read property 'dependencies' of undefined
when certain attributes don't have explicit values. I'm not 100% sure what causes it, but this basic repro illustrates the issue.This works great:
This throws the error:
Stack trace
TypeError: Cannot read property 'dependencies' of undefined at error (/Users/emil/Code/svelte-dependencies-undefined/node_modules/rollup/dist/rollup.js:189:14) at Object.error (/Users/emil/Code/svelte-dependencies-undefined/node_modules/rollup/dist/rollup.js:17549:6) at promise.then.previous (/Users/emil/Code/svelte-dependencies-undefined/node_modules/rollup/dist/rollup.js:17558:32) at at process._tickCallback (internal/process/next_tick.js:188:7) at Function.Module.runMain (module.js:678:11) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3The text was updated successfully, but these errors were encountered: