krisztianb / typedoc-plugin-merge-modules

Plugin for TypeDoc that merges the content of modules
ISC License
22 stars 4 forks source link

Plugin fails to load with typedoc 0.22.3 #6

Closed osesov closed 3 years ago

osesov commented 3 years ago

output:

$ ./node_modules/.bin/typedoc --version
Error: The plugin typedoc-plugin-merge-modules could not be loaded.
Error: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/lib/converter' is not defined by "exports" in /home/osesov/tizen/vscode/zplayer/node_modules/typedoc/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:413:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:652:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.<anonymous> (/home/osesov/tizen/vscode/zplayer/node_modules/typedoc-plugin-merge-modules/dist/plugin.js:4:21)

TypeDoc 0.22.3
Using TypeScript 4.4.2 from ./node_modules/typescript/lib

If that helps - recently the same situation used to be with typedoc-plugin-markdown #249

krisztianb commented 3 years ago

This is caused by an intentional breaking change in TypeDoc 0.22. A lot of plugins are affected by this as you can see here: https://github.com/TypeStrong/typedoc/issues/1696

It should by easy to fix. I guess we just have to import from another path. I hope I can fix it this weekend or maybe sometime next week.

Also it would probably make sense to change the peerDependency back to not supporting newer TypeDoc versions by default.

krisztianb commented 3 years ago

Fixed in 3.0.2 🎉