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)

Đang mở Phù hợp với người mới
#677 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
79/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, nuxt, typescript, vite
Lĩnh vực
backend, build-system

Hướng nghiên cứu

Bắt đầu với bản cập nhật Renovate v11 được nêu trong issue #304 của bảng điều khiển phụ thuộc và kiểm tra phạm vi phiên bản esbuild trong @intlify/bundle-utils. Báo cáo cho biết bundle-utils chỉ sử dụng esbuild.transform cho tài nguyên JavaScript và TypeScript. Xác nhận thay đổi bằng cách cài đặt bản tái hiện được cung cấp với npm 12; công việc hoàn tất khi quá trình cài đặt sạch thành công và phạm vi phụ thuộc v11 chấp nhận esbuild 0.27 hoặc 0.28.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
269
Fork
46
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của intlify/bundle-tools

Tất cả issue của intlify/bundle-tools

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.