-
Notifications
You must be signed in to change notification settings - Fork 74
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 with v5.2.4 #55
Comments
Could you please test, if it works with: .use(require('markdown-it-anchor').default) |
I do not understand where to insert this code. |
I’m affected by this error as well after upgrading to the latest version. I can confirm that the workaround suggested by @nagaozen seems to fix it. |
The workaround does not work for me. Either for |
When using Just another note: In the past, this package required babel transpilation due to modern ES6+ features used in the source code, but with the latest versions it's not required anymore, just require as a ES5 dependency as shown here https://npm.runkit.com/markdown-it-toc-done-right. |
I'm hitting the same problem after v5.1.0. The workaround does work for v5.2.4. But if it's not going to be fixed, I think you should deprecate the v5.x.x versions after v5.1.0 and update the semantic version to v6.x.x. At a minimum, I'd note the need at the top of the npmjs documentation for the time being... Additionally, there are no version tags here after v5.1.0 despite several later released versions on <npmjs.com>. That makes it harder to debug/trace the code for the npmjs version. |
Fixed by including packages using the import markdownItAnchor from 'markdown-it-anchor'
import markdownItTocDoneRight from 'markdown-it-toc-done-right'
const md = require('markdown-it')
.use(markdownItAnchor, {
permalink: true,
permalinkBefore: true,
permalinkSymbol: '' // §
})
.use(markdownItTocDoneRight) |
still doesn't work with nuxt |
Since we migrated our project to microbundle, there are 3 flavours of production ready files built in the dist folder:
There are no breaking changes, in the version 5.x.x since the exactly same version of |
This fix issue. |
Running into "TypeError: plugin.apply is not a function" with version 5.2.4.
The text was updated successfully, but these errors were encountered: