Open chrisvxd opened 5 years ago
@chrisvxd any information on this error? I'm getting it when trying to run sketch2story and not sure where to debug. Thanks!
Hey @LanceALaughlin, it generally means that storybook isn't rendering correctly so story2sketch can't find the node on the page.
Can you confirm your storybook renders in the browser? If not, fix that first. Otherwise, feel free to share your story2sketch config.
I'm getting the same error. I think the root of the problem is the firstChild
attribute in getSymbol(). If getSymbol()
is called without querySelector
defined in the options argument, it sets nodes = document.querySelector(querySelector).firstChild
(note: this should be singular, node
).
The trouble is that, depending on whitespace in the source HTML, that there may or may not be text
nodes surrounding the component node that we actually want. firstElementChild
would avoid that issue.
When encountering an error in the page, it causes the page to become undefined and subsequent attempts to run
goto
on the page to cause a lot of errors:with the latter error repeating as many times as there are symbols remaining.
When encountering an error in a page, story2sketch should exit cleanly.