You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Install the latest version of marked with npm install marked@latest.
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');
The text was updated successfully, but these errors were encountered:
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 namedmarked
, rather than exporting the function directly. This causes aTypeError: marked is not a function
error when trying to usemarked
as a function.Steps to Reproduce
marked
withnpm install marked@latest
.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:The text was updated successfully, but these errors were encountered: