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

Could not be loaded with typedoc 0.27 #27

Open
dgdavid opened this issue Dec 12, 2024 · 0 comments
Open

Could not be loaded with typedoc 0.27 #27

dgdavid opened this issue Dec 12, 2024 · 0 comments

Comments

@dgdavid
Copy link

dgdavid commented Dec 12, 2024

After updating typedoc from 0.26.7 to 0.27.4 the plugin stop working with below error output

[error] The plugin typedoc-plugin-external-module-map could not be loaded

[error] Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/project/node_modules/typedoc/dist/index.js from /path/to/project/node_modules/typedoc-plugin-external-module-map/plugin.js not supported.

Instead change the require of index.js in /path/to/project/node_modules/typedoc-plugin-external-module-map/plugin.js to a dynamic import() which is available in all CommonJS modules.
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at Object. (/path/to/project/node_modules/typedoc-plugin-external-module-map/plugin.js:4:19)

@dgdavid dgdavid changed the title The plugin typedoc-plugin-external-module-map could not be loaded Could not be loaded with typedoc 0.27 Dec 12, 2024
dgdavid added a commit to agama-project/agama that referenced this issue Dec 12, 2024
Because it fails after updating to TypeDoc 0.27.4 and it was introduced
for a purpose that for now it is not currently being used. Thus, let's
postpone its usage until really needed if it is updated to work with the
lastest TypeDoc when such a moment arrive.

See,

  * Agama commit in which it was added  5e09032
  * Issue at upstream asgerjensen/typedoc-plugin-external-module-map#27
dgdavid added a commit to agama-project/agama that referenced this issue Dec 16, 2024
# Problem

After updating to TypeDoc 0.27, the `npm run typedoc` task stop working
because problems when loading `typedoc-plugin-external-module-map`. See
https://github.com/agama-project/agama/actions/runs/12302232612/job/34334622800

## Solution

Open an [issue in
upstream](asgerjensen/typedoc-plugin-external-module-map#27)
and stop using the conflicting plugin, fix all TypeDoc issues (see next
section), and revert commit d946480
added at #1225

## Additional work

Even without the mentioned plugin, TypeDoc tasks still failing because
other crash already mentioned in the commit message of
791857a

> TypeError: Cannot read properties of undefined (reading 'kindOf')
> at
/home/runner/work/agama/agama/web/node_modules/typedoc/dist/lib/models/types.js:687:63

Migrating some components to TypeScript solved the issue. This was done
at commit
34bc000,
which also includes adjustments needed after these migrations.
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

1 participant