Skip to content

fix: add allowImportingTsExtensions and noEmit to tsconfig #896

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

daichi1998928
Copy link

@daichi1998928 daichi1998928 commented May 31, 2025

Fix build error during pnpm build

This PR addresses the build error that occurs when running pnpm build.

Changes Made

  • Added "allowImportingTsExtensions": true, "noEmit": true to tsconfig.json
  • Added ".ts" file extensions to import statements
  • To resolve ES Modules errors

Build Error During pnpm build

@vue/devtools-ui:build: error during build:
@vue/devtools-ui:build: Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '████████████████████/src/devtools/packages/ui/theme' is not supported resolving ES modules imported from ████████████████████/src/devtools/packages/ui/uno.config.ts
@vue/devtools-ui:build:     at finalizeResolution (node:internal/modules/esm/resolver:263:11)
@vue/devtools-ui:build:     at moduleResolve (node:internal/modules/esm/resolver:860:10)
@vue/devtools-ui:build:     at defaultResolve (node:internal/modules/esm/resolver:984:11)
@vue/devtools-ui:build:     at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:780:12)
@vue/devtools-ui:build:     at #cachedDefaultResolve (node:internal/modules/esm/loader:704:25)
@vue/devtools-ui:build:     at ModuleLoader.resolve (node:internal/modules/esm/loader:687:38)
@vue/devtools-ui:build:     at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:305:38)
@vue/devtools-ui:build:     at ModuleJob._link (node:internal/modules/esm/module_job:137:49)
@vue/devtools-ui:build: ELIFECYCLE Command failed with exit code 1.
@vue/devtools-ui:build: ERROR command finished with error: command (████████████████████/src/devtools/packages/ui) ████████████████████/src/devtools/node_modules/.bin/pnpm run build exited (1)
@vue/devtools-core:build: ELIFECYCLE Command failed with exit code 129.
@vue/devtools-api:build: ELIFECYCLE Command failed with exit code 129.
@vue/devtools-ui#build: command (████████████████████/src/devtools/packages/ui) ████████████████████/src/devtools/node_modules/.bin/pnpm run build exited (1)

Tasks:    2 successful, 5 total
Cached:   0 cached, 5 total
  Time:   4.838s
Failed:   @vue/devtools-ui#build

ERROR run failed: command  exited (1)
ELIFECYCLE Command failed with exit code 1.

Root Cause of the Error

  • ES Modules require file extensions in import statements, but some locations were missing these extensions.
  • Using .js extensions causes other errors, so .ts extensions were used instead.

Copy link

netlify bot commented May 31, 2025

Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit 721f39a
🔍 Latest deploy log https://app.netlify.com/projects/vue-devtools-docs/deploys/683b1067e0affb0008cc0f56

@daichi1998928 daichi1998928 changed the title config: add allowImportingTsExtensions and noEmit to tsconfig fix: add allowImportingTsExtensions and noEmit to tsconfig May 31, 2025
@daichi1998928 daichi1998928 marked this pull request as ready for review May 31, 2025 14:39
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.

1 participant