bundle-utils 11.x: `esbuild ^0.25.4` makes `npm install` (npm 12) fail with ERESOLVE next to Vite 8 (Nuxt UI 4.13 + @nuxtjs/i18n 10.7)

Abierto Apto para principiantes
#677 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
79/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, nuxt, typescript, vite

Línea de trabajo

Empieza con la actualización de Renovate de v11 mencionada en la incidencia #304 del panel de dependencias y comprueba el rango de esbuild en @intlify/bundle-utils. El informe indica que bundle-utils solo usa esbuild.transform para recursos JavaScript y TypeScript. Confirma el cambio instalando la reproducción proporcionada con npm 12; se considera terminado cuando la instalación limpia se completa correctamente y el rango de dependencias de v11 acepta esbuild 0.27 o 0.28.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Reporting a bug?

@intlify/bundle-utils 11.2.8 depends on esbuild: ^0.25.4. Vite 8.4 has the optional peer esbuild: ^0.27.0 || ^0.28.0.

So far another package usually put an esbuild 0.27 at the root of node_modules, and bundle-utils' 0.25 was nested below it. @nuxt/ui 4.13 moved to @nuxt/fonts 1.2, which no longer brings one. On npm 12, bundle-utils' esbuild 0.25.12 then ends up at the root, outside Vite's peer range, and a clean npm install fails with ERESOLVE. npm 10.8.2 still installs the same package.json: it puts esbuild 0.28.2 at the root and nests bundle-utils' 0.25.12.

Any Nuxt project with @nuxt/ui ≥ 4.13 and @nuxtjs/i18n hits this on npm 12. The chain is @nuxtjs/i18n 10.7.0 → @intlify/unplugin-vue-i18n ^11.2.8 → @intlify/bundle-utils 11.2.8 (exact).

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error Found: [email protected]
npm error node_modules/esbuild
npm error   peerOptional esbuild@"*" from [email protected]
npm error   ...
npm error   esbuild@"^0.25.4" from @intlify/[email protected]
npm error   node_modules/@intlify/bundle-utils
npm error     @intlify/bundle-utils@"11.2.8" from @intlify/[email protected]
npm error     node_modules/@intlify/unplugin-vue-i18n
npm error       @intlify/unplugin-vue-i18n@"^11.2.8" from @nuxtjs/[email protected]
npm error
npm error Could not resolve dependency:
npm error peerOptional esbuild@"^0.27.0 || ^0.28.0" from [email protected]
npm error node_modules/vite
npm error   peer vite@"^5.2.0 || ^6 || ^7 || ^8" from @tailwindcss/[email protected]
npm error   ...
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/nitropack/node_modules/esbuild
npm error   peerOptional esbuild@"^0.27.0 || ^0.28.0" from [email protected]
Expected behavior

A clean npm install works on npm 12 too. bundle-utils only calls esbuild.transform(…, { loader: 'ts' }) for JS/TS resources, so raising the range should be safe.

The dependency dashboard (#304) already lists the Renovate update for the v11 line, "fix(deps): update dependency esbuild to ^0.28.0 (v11)" (renovate/v11-esbuild-0.x), but it hasn't been opened yet. Could that ship as an 11.2.x patch of @intlify/bundle-utils and @intlify/unplugin-vue-i18n, with esbuild: ^0.27.0 || ^0.28.0? @nuxtjs/i18n 10.x would pick it up through its ^11.2.8 range without a release of its own.

Reproduction

https://github.com/Tkkg1994/nuxt-ui-i18n-esbuild-eresolve

StackBlitz: https://stackblitz.com/github/Tkkg1994/nuxt-ui-i18n-esbuild-eresolve. Its terminal runs npx -y [email protected] install on start and ends in the ERESOLVE. StackBlitz's own npm 10.8.2 installs it, as npm 10 does locally.

{
  "dependencies": {
    "@nuxt/ui": "^4.13.1",
    "@nuxtjs/i18n": "^10.7.0",
    "nuxt": "^4.7.0"
  }
}
Setup Result
npm 12.2.3 ERESOLVE
npm 10.8.2 installs
npm 12, @nuxt/ui ~4.12.2 installs (esbuild 0.27.7 at the root via @nuxt/fonts 0.14 → fontless 0.2)
npm 12, without @nuxtjs/i18n installs
npm 12, "overrides": { "@intlify/bundle-utils": { "esbuild": "^0.27.0" } } installs, everything on esbuild 0.27.7
Issue Package

bundle-utils

System Info
node v24.22.3, npm 12.2.3, Windows 11
also in StackBlitz WebContainer: node v24.22.2, npm 12.2.3 via npx
nuxt 4.7.0, @nuxt/ui 4.13.1, @nuxtjs/i18n 10.7.0,
@intlify/unplugin-vue-i18n 11.2.8, @intlify/bundle-utils 11.2.8, vite 8.4.0
Screenshot

No response

Additional context

Workaround until a release:

"overrides": {
  "@intlify/bundle-utils": { "esbuild": "^0.27.0" }
}
Validations
  • Read the Contributing Guidelines.
  • Read the README
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Lenguaje dominante
TypeScript
Estrellas
269
Forks
46
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de intlify/bundle-tools

Todos los issues de intlify/bundle-tools

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.