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

TypeDocBuildError #18

Open
krabhi4 opened this issue Dec 20, 2023 · 1 comment
Open

TypeDocBuildError #18

krabhi4 opened this issue Dec 20, 2023 · 1 comment

Comments

@krabhi4
Copy link

krabhi4 commented Dec 20, 2023

Package - @mantine/core@6.0.21 and all @mantine/core
image

@pastelsky
Copy link
Owner

pastelsky commented Jan 2, 2024

This happens because we don't automatically install type definitions for peer dependencies of a package.
The fix would involve checking if type definitions for peer dependencies are available on definitely typed, and install them in this part of the code — 

const installPath = await InstallationUtils.preparePath(
packageJSON.name,
packageJSON.version,
);
logger.info("Package will be installed in", { installPath });
const packageString = `${packageJSON.name}@${packageJSON.version}`;
// A package can refer to `@types` packages in its own types. By default
// we don't install any dev dependencies, but we need to install these types
// for resolving the type tree
let devDependencyTypes = Object.entries(packageJSON.devDependencies || {})
.filter(([depName]) => depName.startsWith("@types/"))
.map(([depName, depVersion]) => `${depName}@${depVersion}`);
// Include node inbuilt types for packages targeting node
if (!devDependencyTypes.some((type) => type.startsWith("@types/node"))) {
devDependencyTypes.push("@types/node@20.10.5");
}

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

2 participants