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

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

@epozsh

Description

@epozsh

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions