Fragno

Troubleshooting

Troubleshooting Fragno fragments

Edit on GitHub

This page contains information on how to troubleshoot common issues when building Fragno fragments. If you encounter an issue not covered here, please open an issue on the Fragno GitHub repository.

TypeScript Errors

Error TS2742: The inferred type of T cannot be named without a reference to T. This is likely not portable. A type annotation is necessary.

Since Fragno uses complex types extensively, TypeScript will sometimes be unable to infer types of the Fragno library definition or client-side object. Usually, a simple type annotation fixes this problem. However, since we want the types to be inferred, we need to re-export the type from the Fragno package.

In the file that exports the Fragno library definition or client-side object, add the following line:

export type { FragnoRouteConfig } from "@fragno-dev/core/api";

In some cases, it might be another type that is causing the error. In that case, you can add the type annotation to the specific type that is causing the error. Unfortunately, there is no consistent way to determine which type is causing the error.

For more information on this error, see this GitHub issue.

If this does not resolve your issue, please open an issue on the Fragno GitHub repository.