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

fails to convert component with unhelpful error #47

Open
cdaringe opened this issue Nov 1, 2016 · 1 comment
Open

fails to convert component with unhelpful error #47

cdaringe opened this issue Nov 1, 2016 · 1 comment

Comments

@cdaringe
Copy link

cdaringe commented Nov 1, 2016

problem statement

  • app crashes

discusion

<!-- card.html -->
<div class="bill brasky">
  <h4>card title</h4>
  <p>content</p>
</div>
$ reacterminator c html/card.html
/usr/local/lib/node_modules/reacterminator/lib/plugins/main/process-each-jsx-snippet.js:74
    const isSvg = $node.get(0).tagName === 'svg';
                              ^

TypeError: Cannot read property 'tagName' of undefined
    at traverse (/usr/local/lib/node_modules/reacterminator/lib/plugins/main/process-each-jsx-snippet.js:74:31)
    at traverse (/usr/local/lib/node_modules/reacterminator/lib/helpers/traverse-cheerio-node.js:2:7)
    at replaceAttrNameForJsx (/usr/local/lib/node_modules/reacterminator/lib/plugins/main/process-each-jsx-snippet.js:72:3)
    at processEachJsxSnippet (/usr/local/lib/node_modules/reacterminator/lib/plugins/main/process-each-jsx-snippet.js:105:3)
    at _.reduce (/usr/local/lib/node_modules/reacterminator/lib/index.js:44:12)
    at /usr/local/lib/node_modules/reacterminator/node_modules/lodash/lodash.js:928:11
    at /usr/local/lib/node_modules/reacterminator/node_modules/lodash/lodash.js:4938:15
    at baseForOwn (/usr/local/lib/node_modules/reacterminator/node_modules/lodash/lodash.js:2988:24)
    at /usr/local/lib/node_modules/reacterminator/node_modules/lodash/lodash.js:4907:18
    at baseReduce (/usr/local/lib/node_modules/reacterminator/node_modules/lodash/lodash.js:925:5)
@Chun-Yang
Copy link
Contributor

Hey @cdaringe , right now, you have to wrap your divs into body tags.

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