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

TypeError: plugin.apply is not a function #12

Closed
arve0 opened this issue Nov 29, 2015 · 2 comments
Closed

TypeError: plugin.apply is not a function #12

arve0 opened this issue Nov 29, 2015 · 2 comments

Comments

@arve0
Copy link
Contributor

arve0 commented Nov 29, 2015

...\node_modules\markdown-it\lib\index.js:477
  plugin.apply(plugin, args);
         ^

TypeError: plugin.apply is not a function

Seems like the babel upgrade uses exports.default, which node does not load as a function:

$ npm install markdown-it-anchor
$ node
> require("markdown-it-anchor")
{ default:
   { [Function: anchor]
     defaults:
      { level: 1,
        slugify: [Function: slugify],
        permalink: false,
        renderPermalink: [Function: renderPermalink],
        permalinkClass: 'header-anchor',
        permalinkSymbol: '',
        permalinkBefore: false } } }

Which breaks md.use(require('markdown-it-anchor')).

@valeriangalliat
Copy link
Owner

Fixed as of 2.3.2, thank you!

@fzdy1914
Copy link

fzdy1914 commented Jul 9, 2019

It seems that this problem is back again.

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

3 participants