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

rehype-stringify 10.0.0 does not compile #149

Closed
4 tasks done
frankplow opened this issue Aug 27, 2023 · 6 comments
Closed
4 tasks done

rehype-stringify 10.0.0 does not compile #149

frankplow opened this issue Aug 27, 2023 · 6 comments
Labels
📦 area/deps This affects dependencies 🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@frankplow
Copy link

frankplow commented Aug 27, 2023

Initial checklist

Affected packages and versions

rehype-stringify v10.0.0

Link to runnable example

No response (FYI stackblitz would not run your MWE template for me)

Steps to reproduce

Using the following snippet

import {unified} from 'unified'
import rehypeParse from 'rehype-parse'
import rehypeStringify from 'rehype-stringify'

const content = await unified()
    .use(rehypeParse)
    .use(rehypeStringify)
    .process('<h1>Hello World</h1>');

Expected behavior

The code should run and compile the HTML to a string.

Actual behavior

The code has the following runtime error:
Error [TypeError]: Cannot 'process' without 'Compiler'
and does not compile anything.

Downgrading the package to 9.0.4 fixes the issue.

Runtime

Node.js v20.5.1

Package manager

NPM 9.8.1

OS

Linux

Build and bundle tools

Next.js

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Aug 27, 2023
@ChristianMurphy
Copy link
Member

Welcome @frankplow! 👋
Sorry you ran into a spot of trouble.
What version of unified are you using?
Have you checked that you are running the latest version?

@ChristianMurphy ChristianMurphy added the 🙉 open/needs-info This needs some more info label Aug 27, 2023
@github-actions

This comment has been minimized.

@frankplow
Copy link
Author

Welcome @frankplow! 👋 Sorry you ran into a spot of trouble. What version of unified are you using? Have you checked that you are running the latest version?

Thanks, updating to the latest unified fixed the problem. I'm afraid I did not check my package-lock.json before updating so am unable to tell you which version of unified showed the problem.

@ChristianMurphy ChristianMurphy added 🙋 no/question This does not need any changes 📦 area/deps This affects dependencies and removed 🙉 open/needs-info This needs some more info labels Aug 27, 2023
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Aug 27, 2023
@github-actions

This comment has been minimized.

@ChristianMurphy
Copy link
Member

Glad it's sorted!

@github-actions

This comment has been minimized.

@github-actions github-actions bot added the 👎 phase/no Post cannot or will not be acted on label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 area/deps This affects dependencies 🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants