Skip to content

chore(dts-plugin): optimize type-001 message#3681

Merged
zhoushaw merged 2 commits intomainfrom
chore/type-msg
Apr 9, 2025
Merged

chore(dts-plugin): optimize type-001 message#3681
zhoushaw merged 2 commits intomainfrom
chore/type-msg

Conversation

@2heal1
Copy link
Copy Markdown
Member

@2heal1 2heal1 commented Apr 9, 2025

Description

optimize type-001 message

before

[ Module Federation DTS ] Unable to compile federated types Error: Failed to generate type declaration. #TYPE-001
args: {"cmd":"npx tsc --project /universe/apps/modernjs-ssr/nested-remote/node_modules/.federation/tsconfig.788e4e9197be2720477f47dc561736df.json"}
https://module-federation.io/guide/troubleshooting/type/TYPE-001
Error in mf:generateTypes processAssets hook: Error: ENOENT: no such file or directory, open '/universe/apps/modernjs-ssr/nested-remote/dist/@mf-types.zip'
    at Object.openSync (node:fs:596:3)
    at Object.readFileSync (node:fs:464:35)
    at _GenerateTypesPlugin.<anonymous> (/universe/packages/dts-plugin/dist/index.js:2772:51)
    at Generator.next (<anonymous>)
    at fulfilled (/universe/packages/dts-plugin/dist/index.js:66:24)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/universe/apps/modernjs-ssr/nested-remote/dist/@mf-types.zip'
}

after

[ Module Federation DTS ] Error: Failed to generate type declaration. Execute the below cmd to reproduce and fix the error. #TYPE-001
args: {"cmd":"npx tsc --project /universe/apps/modernjs-ssr/nested-remote/node_modules/.federation/tsconfig.e0a9a0239e9396061c9e7d34c35a966a.json"}
View the docs to see how tow solve: https://module-federation.io/guide/troubleshooting/type/TYPE-001
    at /universe/packages/dts-plugin/dist/fork-generate-dts.js:396:13
    at Generator.next (<anonymous>)
    at fulfilled (/universe/packages/dts-plugin/dist/fork-generate-dts.js:66:24)

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2025

🦋 Changeset detected

Latest commit: 56ef691

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 31 packages
Name Type
@module-federation/dts-plugin Patch
@module-federation/cli Patch
@module-federation/enhanced Patch
@module-federation/manifest Patch
@module-federation/rspack Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/rsbuild-plugin Patch
@module-federation/storybook-addon Patch
@module-federation/modernjsapp Patch
@module-federation/runtime Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/runtime-core Patch
create-module-federation Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch
website-new Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 9, 2025

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 56ef691
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/67f63da38f8031000828bdeb
😎 Deploy Preview https://deploy-preview-3681--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@zhoushaw zhoushaw merged commit ebef2d0 into main Apr 9, 2025
16 checks passed
@zhoushaw zhoushaw deleted the chore/type-msg branch April 9, 2025 09:50
@2heal1 2heal1 mentioned this pull request Apr 15, 2025
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

Successfully merging this pull request may close these issues.

3 participants