nuxt / nuxt

The Intuitive Vue Framework.

Home Page:https://nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hello, there is a duplicate item in the compilerOptions.paths in tsconfig.server.json, which includes "~/*": ["../*", "../*"]

wsm661 opened this issue · comments

Environment


  • Operating System: Windows_NT
  • Node Version: v20.2.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@8.15.7
  • Builder: -
  • User Config: buildDir, plugins, modules, components, build, runtimeConfig, app, css, nitro, webpack, experimental, vite, hooks
  • Runtime Modules: @pinia/nuxt@0.4.11, @vueuse/nuxt@9.13.0, nuxt-windicss@2.6.1, @nuxt/content@2.12.1, @pinia-plugin-persistedstate/nuxt@1.2.0, nuxt-swiper@1.2.2, @fullpage/nuxt-fullpage@0.2.5,
    nuxt-custom-elements@2.0.0-beta.30
  • Build Modules: -

Reproduction

{
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"allowJs": true,
"resolveJsonModule": true,
"jsx": "preserve",
"allowSyntheticDefaultImports": true,
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
"paths": {
"#imports": [
"./types/nitro-imports"
],
"/": [
"../
",
"../"
],
"@/
": [
"../",
"../
"
],
"~~/": [
"../
",
"../"
],
"@@/
": [
"../",
"../
"
],
"nitropack": [
"../node_modules/.pnpm/nitropack@2.9.6_@opentelemetry+api@1.8.0/node_modules/nitropack"
],
"defu": [
"../node_modules/.pnpm/defu@6.1.4/node_modules/defu"
],
"h3": [
"../node_modules/.pnpm/h3@1.11.1/node_modules/h3"
],
"consola": [
"../node_modules/.pnpm/consola@3.2.3/node_modules/consola"
],
"ofetch": [
"../node_modules/.pnpm/ofetch@1.3.4/node_modules/ofetch"
],
"@unhead/vue": [
"../node_modules/.pnpm/@unhead+vue@1.9.10_vue@3.4.27/node_modules/@unhead/vue"
],
"vue": [
"../node_modules/.pnpm/vue@3.4.27_typescript@4.9.5/node_modules/vue"
],
"@vue/runtime-core": [
"../node_modules/.pnpm/@VUE+runtime-core@3.4.27/node_modules/@vue/runtime-core"
],
"@vue/compiler-sfc": [
"../node_modules/.pnpm/@VUE+compiler-sfc@3.4.27/node_modules/@vue/compiler-sfc"
],
"@vue/runtime-dom": [
"../node_modules/.pnpm/@VUE+runtime-dom@3.4.27/node_modules/@vue/runtime-dom"
],
"vue-router": [
"../node_modules/.pnpm/vue-router@4.3.2_vue@3.4.27/node_modules/vue-router"
],
"@nuxt/schema": [
"../node_modules/.pnpm/@nuxt+schema@3.11.2/node_modules/@nuxt/schema"
],
"nuxt": [
"../node_modules/.pnpm/nuxt@3.11.2_@opentelemetry+api@1.8.0_@types+node@20.12.10_@unocss+reset@0.59.4_axios@1.6.8_es_lpygmdtxnyx6axvndzx7eo724q/node_modules/nuxt"
],
"#internal/nuxt/paths": [
"../node_modules/.pnpm/nuxt@3.11.2_@opentelemetry+api@1.8.0_@types+node@20.12.10_@unocss+reset@0.59.4_axios@1.6.8_es_lpygmdtxnyx6axvndzx7eo724q/node_modules/nuxt/dist/core/runtime/nitro/paths"
],
"
": [
"./.."
],
"@": [
"./.."
],
"~~": [
"./.."
],
"@@": [
"./.."
],
"assets": [
"../assets"
],
"assets/": [
"../assets/
"
],
"public": [
"../public"
],
"public/": [
"../public/
"
],
"pinia": [
"../node_modules/.pnpm/pinia@2.1.7_typescript@4.9.5_vue@3.4.27/node_modules/pinia/dist/pinia"
],
"#mdc-configs": [
"./mdc-configs"
],
"#mdc-highlighter": [
"./mdc-highlighter"
],
"#mdc-imports": [
"./mdc-imports"
],
"#customElements": [
"../node_modules/.pnpm/nuxt-custom-elements@2.0.0-beta.30_baiwusanyu-utils@1.0.18_estree-walker-ts@1.0.1_fast-glob@3_bpst3c3tneufmcdtkfgpgfq7se/node_modules/nuxt-custom-elements/dist/runtime"
],
"#customElements/": [
"../node_modules/.pnpm/nuxt-custom-elements@2.0.0-beta.30_baiwusanyu-utils@1.0.18_estree-walker-ts@1.0.1_fast-glob@3_bpst3c3tneufmcdtkfgpgfq7se/node_modules/nuxt-custom-elements/dist/runtime/
"
],
"#customElementsEntries": [
"./nuxt-custom-elements/entries"
],
"#windicss/transformer": [
"../node_modules/.pnpm/nuxt-windicss@2.6.1_vite@5.2.11/node_modules/nuxt-windicss/dist/runtime/server/class-extractor"
],
"#content/server": [
"../node_modules/.pnpm/@nuxt+content@2.12.1_nuxt@3.11.2_vue@3.4.27/node_modules/@nuxt/content/dist/runtime/legacy/server"
]
}
},
"include": [
"./types/nitro-nuxt.d.ts",
"../node_modules/.pnpm/@pinia+nuxt@0.4.11_typescript@4.9.5_vue@3.4.27/node_modules/@pinia/nuxt/runtime/server",
"../node_modules/.pnpm/@vueuse+nuxt@9.13.0_nuxt@3.11.2_vue@3.4.27/node_modules/@vueuse/nuxt/runtime/server",
"../node_modules/.pnpm/nuxt-windicss@2.6.1_vite@5.2.11/node_modules/nuxt-windicss/runtime/server",
"../node_modules/.pnpm/@nuxtjs+mdc@0.6.1/node_modules/@nuxtjs/mdc/runtime/server",
"../node_modules/.pnpm/@nuxt+content@2.12.1_nuxt@3.11.2_vue@3.4.27/node_modules/@nuxt/content/runtime/server",
"../node_modules/.pnpm/@pinia-plugin-persistedstate+nuxt@1.2.0_@pinia+nuxt@0.4.11_pinia@2.1.7/node_modules/@pinia-plugin-persistedstate/nuxt/runtime/server",
"../node_modules/.pnpm/nuxt-swiper@1.2.2/node_modules/nuxt-swiper/runtime/server",
"../node_modules/.pnpm/@fullpage+nuxt-fullpage@0.2.5_vue@3.4.27/node_modules/@fullpage/nuxt-fullpage/runtime/server",
"../node_modules/.pnpm/nuxt-custom-elements@2.0.0-beta.30_baiwusanyu-utils@1.0.18_estree-walker-ts@1.0.1_fast-glob@3_bpst3c3tneufmcdtkfgpgfq7se/node_modules/nuxt-custom-elements/runtime/server",
"../node_modules/.pnpm/@nuxt+devtools@1.2.0_@unocss+reset@0.59.4_axios@1.6.8_floating-vue@5.2.2_nuxt@3.11.2_unocss@0_d43dlsvia4icibaykwgiu6irhu/node_modules/@nuxt/devtools/runtime/server",
"../node_modules/.pnpm/@nuxt+telemetry@2.5.4/node_modules/@nuxt/telemetry/runtime/server",
"./types/nitro.d.ts",
"..//*",
"../server/
/*"
],
"exclude": [
"../node_modules",
"../node_modules/.pnpm/nuxt@3.11.2_@opentelemetry+api@1.8.0_@types+node@20.12.10_@unocss+reset@0.59.4_axios@1.6.8_es_lpygmdtxnyx6axvndzx7eo724q/node_modules/nuxt/node_modules",
"../dist"
]
}

Describe the bug

Hello, there is an issue with the content generated automatically by tsconfig.server.json

Additional context

No response

Logs

No response

Would you be able to provide a reproduction? 🙏

More info

Why do I need to provide a reproduction?

Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.

What will happen?

If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.

If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.

How can I create a reproduction?

We have a couple of templates for starting with a minimal reproduction:

👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz
👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox

A public GitHub repository is also perfect. 👌

Please ensure that the reproduction is as minimal as possible. See more details in our guide.

You might also find these other articles interesting and/or helpful:

When the version of Nitro is 2.9.6, this issue will occur. Simply creating a standard Nuxt project can reproduce this issue.

@qicrosoft can you still provide a reproduction? Shouldn't take long if it is that straightforward 😋

@qicrosoft can you still provide a reproduction? Shouldn't take long if it is that straightforward 😋

Just run npx nuxi@latest init <project-name> to create a new project and you will encounter this issue. The reason I've mentioned is due to the current upgrade to Nitro 2.9.6. Even if you use a Nuxt version before 3.11.2, it will automatically use the latest Nitro (2.9.6), which will also lead to the problem of duplicate paths in tsconfig.server.json. Nitro 2.9.6 might be causing this issue due to this commit: nitro commit.