mf-type-check

Diagnose TypeScript type issues in Module Federation setups.

2.6k|423|Updated Oct 24, 2020
One-click install
npx skills add https://github.com/module-federation/core --skill mf-type-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mf-type-check
Source: https://github.com/module-federation/core/tree/main/skills/mf-type-check
Command: npx skills add https://github.com/module-federation/core --skill mf-type-check

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps resolve TypeScript type errors and configuration issues related to Module Federation, ensuring seamless integration and type safety across micro-frontend applications.

Core Features & Use Cases

  • Diagnose Type Generation Failures: Identifies and helps fix errors when producers fail to generate type definition files (.d.ts).
  • Resolve Type Pulling Issues: Assists when consumers cannot download or locate remote type definitions.
  • Configure tsconfig.json: Guides users on correctly setting up tsconfig.json to consume remote types.
  • Check Environment Setup: Verifies the presence of tsconfig.json and the typescript dependency.
  • Use Case: A developer is seeing TypeScript errors like "Cannot find module '@remote-app/component' or its corresponding type declarations" after setting up Module Federation. This Skill can pinpoint whether the issue is with type generation on the producer side, the consumer's inability to pull types, or a misconfiguration in tsconfig.json.

Quick Start

Run the mf-type-check skill with your project root to diagnose type issues.

Frequently Asked Questions about mf-type-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does Module Federation fail with 'Cannot find module' TypeScript errors?

Module Federation TypeScript errors occur when consumers cannot locate remote type definitions. This Skill diagnoses whether the failure stems from producer .d.ts generation issues or the consumer's inability to pull remote types.

How do I fix TypeScript type generation failures in a Module Federation producer?

Fixing TypeScript type generation failures in a Module Federation producer requires verifying your environment setup. This Skill checks for the required tsconfig.json and typescript dependency to resolve .d.ts output issues.

How to configure tsconfig.json to consume remote types in Module Federation?

Configuring tsconfig.json to consume remote types in Module Federation requires correct path and module resolution settings. This Skill guides you through the exact tsconfig.json adjustments needed to properly consume remote type definitions.

What environment setup is required for Module Federation type checking?

Environment setup for Module Federation type checking requires a valid tsconfig.json file and the installed typescript dependency. This Skill verifies these prerequisites to ensure seamless type safety across micro-frontend applications.

Module Federation remote types not working, how to diagnose the issue?

Diagnosing Module Federation remote types not working involves checking producer type file generation, consumer type pulling mechanisms, and tsconfig.json configurations. This Skill pinpoints the exact failure point across these areas.