FormidableLabs/rapscallion

Unhandled rejection TypeError: Unknown node of type: undefined

Open

#109 aberto em 13 de jul. de 2017

Ver no GitHub
 (1 comment) (3 reactions) (0 assignees)JavaScript (68 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (1.397 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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?

Guia do colaborador