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

Change in marked package causes TypeError #26

Open
TogetherBuilt opened this issue Jun 3, 2024 · 0 comments
Open

Change in marked package causes TypeError #26

TogetherBuilt opened this issue Jun 3, 2024 · 0 comments

Comments

@TogetherBuilt
Copy link

Description

The marked package has changed the way it exports its functionality in a recent version. It now exports an object that contains a function named marked, rather than exporting the function directly. This causes a TypeError: marked is not a function error when trying to use marked as a function.

Steps to Reproduce

  1. Install the latest version of marked with npm install marked@latest.
  2. Try to use marked as a function in the code.

Expected Behavior

marked should be a function that can be used to convert markdown to HTML.

Actual Behavior

marked is an object, and trying to use it as a function causes a TypeError.

Possible Solution

Adjust the import statement to use the marked function from the exported object:

const { marked } = require('marked');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant