Skip to content

Change in marked package causes TypeError #26

Description

@TogetherBuilt

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');

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions