typedoc-plugin-markdown
typedoc-plugin-markdown copied to clipboard
Type errors when building with docusaurus
trafficstars
I'm using the docusaurus plugin and getting a plethora of type errors ( TS2305, TS2707 ).
It seems that typedoc-plugin-markdown is trying to resolve types inside node_modules/@types.
My project structure is like this:
src/(typescript code)
tsconfig.json
documentation (docusaurus folder)
-- tsconfig.json
-- (other docusaurus stuff)
Plugin configuration:
plugins: [
[
'docusaurus-plugin-typedoc',
// Plugin / TypeDoc options
{
entryPoints: [
'../src/list/of/files
],
exclude: [ '../**/*.test.ts', '../node_modules'],
tsconfig: '../tsconfig.json',
readme: 'none',
out: 'code-docs',
sidebar: {
cateboryLabel: 'Code Documentation',
position: '3',
},
}
]
Example error:
Error: ../node_modules/@types/webpack/index.d.ts:32:3 - error TS2305: Module '"tapable"' has no exported member 'Tapable'.
I'm not sure why docusaurus-plugin-typedoc is referencing node_modules/@types/webpack/index.d.ts
Hi apologies for the delay. Is this still and issue - I have a suspicion that TypeDoc is trying to resolve those paths rather than the plugin. Is the code on public repo?
The repo is not public. The issue is kind of random to reproduce - it goes away after a fresh npm install.