Custom Markdoc's components work on local with wra...
# workers-help
r
I've create a custom Markdoc components following this guide: https://markdoc.dev/docs/examples/react In local, the component (Counter) works ok, and when consologing you get this:
Copy code
{
      '$$mdtype': 'Tag',
      name: 'Counter',
      attributes: [Object],
      children: []
    }
But on deploying to Pages I get an error
Copy code
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
and the console:
Copy code
{
      '$$mdtype': 'Tag',
      name: '_R',
      attributes: [Object],
      children: []
    }
So it's like the render is working locally and not online. I've spotted the 'rendering error' in the
transform
method:
Copy code
const ast = parse(markdown) 
const config = {
        tags: { counter, },
       
    }
    return transform(ast, config)
`
What else can I do to debug it? Is the bug in Worker backend?? (because Markdoc works ok locally)
@sergiodxa I've followed your guide to implement Markdoc components, and it works locally, but I get this error when deploying on CF Pages. Have you make it work on CF? thx https://sergiodxa.com/articles/parse-markdown-with-markdoc-in-remix