Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Unhandled rejection TypeError: Unknown node of type: undefined #109

Open
epozsh opened this issue Jul 13, 2017 · 1 comment
Open

Unhandled rejection TypeError: Unknown node of type: undefined #109

epozsh opened this issue Jul 13, 2017 · 1 comment

Comments

@epozsh
Copy link

epozsh commented Jul 13, 2017

Hello, i am using react starter kit and trying to replace reactdom with rapscallion. butt i getting this error

Unhandled rejection TypeError: Unknown node of type: undefined
    at traverse (.......\node_modules\rapscallion\lib\render\traverse.js:373:9)
     at renderChildrenArray (\node_modules\rapscallion\lib\render\traverse.js:57:7)
    at renderChildren (\node_modules\rapscallion\lib\render\traverse.js:78:5)
    at \node_modules\rapscallion\lib\render\traverse.js:127:14
    at Sequence.pushFrame (\node_modules\rapscallion\lib\sequence\sequence.js:49:14)
    at C:\Projects\ellinairwebsite\node_modules\rapscallion\lib\sequence\sequence.js:137:30

I tried to replace a part

const html = ReactDOM.renderToStaticMarkup(<Html {...data} />);
 res.status(route.status || 200);
 res.send(`<!doctype html>${html}`);

with

const html = rapscallion.render(<Html {...data} />);
 let responseTemplate = rapscallion.template`<!doctype html>${html}`;
 responseTemplate.toStream().pipe(res);

any suggestion?

@88kami88
Copy link
Contributor

88kami88 commented Aug 2, 2017

Do you happen to have a simple React DOM component tree that can reproduce this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants