FormidableLabs/rapscallion

Unhandled rejection TypeError: Unknown node of type: undefined

Open

#109 aperta il 13 lug 2017

Vedi su GitHub
 (1 commento) (3 reazioni) (0 assegnatari)JavaScript (68 fork)batch import
bughelp wanted

Metriche repository

Star
 (1397 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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?

Guida contributor