Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot handle unknown node table #543

Closed
niftylettuce opened this issue Oct 17, 2020 · 8 comments
Closed

Error: Cannot handle unknown node table #543

niftylettuce opened this issue Oct 17, 2020 · 8 comments
Labels
🤷 no/invalid This cannot be acted upon

Comments

@niftylettuce
Copy link
Contributor

Getting this error using latest version of all remark plugins, CLI, etc. (I'm working locally and version bumped everything to latest).

README.md
  1:1  error  Error: Cannot handle unknown node `table`
    at Object.unknown (/Users/user/Projects/eslint-config-xo-lass/node_modules/mdast-util-to-markdown/lib/index.js:52:9)
    at Object.one [as handle] (/Users/user/Projects/eslint-config-xo-lass/node_modules/zwitch/index.js:20:25)
    at flow (/Users/user/Projects/eslint-config-xo-lass/node_modules/mdast-util-to-markdown/lib/util/container-flow.js:18:15)
    at root (/Users/user/Projects/eslint-config-xo-lass/node_modules/mdast-util-to-markdown/lib/handle/root.js:6:10)
    at one (/Users/user/Projects/eslint-config-xo-lass/node_modules/zwitch/index.js:20:25)
    at toMarkdown (/Users/user/Projects/eslint-config-xo-lass/node_modules/mdast-util-to-markdown/lib/index.js:25:16)
    at compile (/Users/user/Projects/eslint-config-xo-lass/node_modules/remark-stringify/index.js:13:12)
    at Function.stringify (/Users/user/Projects/eslint-config-xo-lass/node_modules/unified/index.js:354:12)
    at stringify (/Users/user/Projects/eslint-config-xo-lass/node_modules/unified-engine/lib/file-pipeline/stringify.js:45:23)
    at wrapped (/Users/user/Projects/eslint-config-xo-lass/node_modules/trough/wrap.js:25:19)
@niftylettuce niftylettuce added 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Oct 17, 2020
@ChristianMurphy
Copy link
Member

@niftylettuce please fill out the issue template https://github.com/remarkjs/.github/blob/main/.github/ISSUE_TEMPLATE/1-bug.md
It provides the context we need in order to help.

@ChristianMurphy ChristianMurphy added 🙉 open/needs-info This needs some more info and removed 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Oct 17, 2020
@ChristianMurphy
Copy link
Member

Also if you recently upgrade to latest, please see the release notes: https://github.com/remarkjs/remark/releases/tag/13.0.0
in particular:

Did you use GFM (tables and so, used to be the default)? Now add remark-gfm

@niftylettuce
Copy link
Contributor Author

I've narrowed it down to remark-contributors being the issue (have had a lot of issues with this package over time).

https://github.com/remarkjs/remark-contributors

@wooorm
Copy link
Member

wooorm commented Oct 18, 2020

@niftylettuce Please do not remove issue templates: I can understand newcomers forgetting that but you have significant experience here on GH. The answer you are looking for is as Christian pointed out documented in the migration section on the release notes.

@milahu

This comment was marked as off-topic.

@wooorm
Copy link
Member

wooorm commented Sep 22, 2022

@milahu It seems you have not read the thread. You should use remark-gfm to enable GFM extensions that are not in standard markdown.

@milahu
Copy link

milahu commented Sep 22, 2022

i want to produce "strict markdown" with html tables, so remark-gfm does not help

the error message is a bit obscure to a unifiedjs noob like me, so im sharing my solution here

@wooorm
Copy link
Member

wooorm commented Sep 22, 2022

Okay! The main solution to this error that I believe most folks are looking for when they stumble here, is: use remark-gfm, as it handles table nodes.

If you don’t want GFM, your solution works (as you note, not all HTML can be represented in markdown though). For more info, see: https://github.com/rehypejs/rehype-remark#example-keeping-some-html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 no/invalid This cannot be acted upon
Development

No branches or pull requests

4 participants