question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cross-package references in monorepository not working

See original GitHub issue

Search terms

monorepository entrypointStrategy packages reference

Expected Behavior

Cross-package references should “work” when generating documentation for several packages in a monorepository (using yarn workspaces), with an entrypointStrategy set to packages.

Actual Behavior

Cross-package references yield a warning:

A, defined at packages/a/lib/index.d.ts:3, is referenced by @typedoc-packages-missing-export/b.B.__type.a but not included in the documentation.

And the resulting documentation does not have hyperlinks for such references.

Steps to reproduce the bug

Here is an example repository to reproduce the bug: https://github.com/nlepage/typedoc-packages-missing-export

Environment

  • Typedoc version: 0.22.10
  • TypeScript version: 4.5.4
  • Node.js version: 14.17.0
  • OS: Linux

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
nlepagecommented, Jan 13, 2022

Hey @Gerrit0

I made a plugin to solve the problem: nlepage/typedoc-plugin-resolve-crossmodule-references. Not sure about all of it, but it works fine for the basic cases. Here is an example of generated documentation where types from a module a reference a type B from a module b. It is published on npm.

I’m not sure if it can help with project references as I’m not familiar with these.

Let me know if it is something you would like to integrate in TypeDoc itself. It needs only one new dependency (plus a transitive one): convert-source-map.

1reaction
nlepagecommented, Jul 22, 2022

@nlepage Are there any prerequisite I need to know or settings made to get your plugin working? I just installed and tried but unfortunately it did not work for me 😦

@phihochzwei I published a new release of the plugin, let me know if it works for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compile multiple packages in a mono-repo in a single ...
A project I'm working on (a fairly large monorepo) is not yet able to upgrade to use project references, and until very recently...
Read more >
Cross-repository Component Sharing using Mono-repo Multi ...
Mono repo means that you will end up with multiple projects as packages within the same git ... Using a monorepo we can...
Read more >
Simple monorepos via npm workspaces and TypeScript ...
In this blog post, we'll explore how to set up a simple monorepo for two npm packages. All we need is already built...
Read more >
What am I missing in this TS mono-repo setup? - Stack Overflow
I've been struggling to get this TypeScript npm monorepo bootstrapped. My goal is to have various "packages" which I can cross import from....
Read more >
Working with monorepos - Expo Documentation
Monorepos, or "monolithic repositories", are single repositories containing multiple apps or packages. It can help speed up development for larger projects, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found