Command
new
Is this a regression?
The previous version in which this bug was not present was
21
Description
On a fresh Angular 22 project, after running ng new, 2 different versions of esbuild are present in node_modules. It looks like it can cause issues.
Minimal Reproduction
Create a new Angular 22 project with ng new, then run npm ls esbuild:
`-- @angular/build@22.0.0
+-- esbuild@0.28.0
`-- vite@7.3.2
`-- esbuild@0.27.7
Compared to a previous version, here with Angular 21.2.8:
+-- @angular/build@21.2.8
| +-- esbuild@0.27.3
| `-- vite@7.3.2
| `-- esbuild@0.27.3 deduped
`-- ng-packagr@21.2.3
`-- esbuild@0.27.3 deduped
Your Environment
Angular CLI : 22.0.0
Angular : 22.0.0
Node.js : 24.16.0
Package Manager : npm 11.13.0
Operating System : win32 x64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build │ 22.0.0 │ ^22.0.0 │
│ @angular/cli │ 22.0.0 │ ^22.0.0 │
│ @angular/common │ 22.0.0 │ ^22.0.0 │
│ @angular/compiler │ 22.0.0 │ ^22.0.0 │
│ @angular/compiler-cli │ 22.0.0 │ ^22.0.0 │
│ @angular/core │ 22.0.0 │ ^22.0.0 │
│ @angular/forms │ 22.0.0 │ ^22.0.0 │
│ @angular/platform-browser │ 22.0.0 │ ^22.0.0 │
│ @angular/router │ 22.0.0 │ ^22.0.0 │
│ rxjs │ 7.8.2 │ ~7.8.0 │
│ typescript │ 6.0.3 │ ~6.0.2 │
│ vitest │ 4.1.8 │ ^4.0.8 │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else relevant?
In our pipeline we run two ng build in parallel. Most of the time we get the following error, and a github issue search seem to indicate that this may be caused by multiple esbuild versions:
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
github.com/evanw/esbuild/internal/helpers.(*ThreadSafeWaitGroup).Wait(...)
github.com/evanw/esbuild/internal/helpers/waitgroup.go:36
main.runService.func2()
github.com/evanw/esbuild/cmd/esbuild/service.go:114 +0x53
main.runService(0x1)
github.com/evanw/esbuild/cmd/esbuild/service.go:160 +0x637
main.main()
github.com/evanw/esbuild/cmd/esbuild/main.go:252 +0xb16
goroutine 7 [chan receive]:
main.runService.func1()
github.com/evanw/esbuild/cmd/esbuild/service.go:98 +0x45
created by main.runService in goroutine 1
github.com/evanw/esbuild/cmd/esbuild/service.go:97 +0x1ce
goroutine 8 [chan receive]:
main.(*serviceType).sendRequest(0x249e75aaf050, {0xa08b60, 0x249e8b3a3b00})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0x12b
main.runService.func3()
github.com/evanw/esbuild/cmd/esbuild/service.go:125 +0x3e
created by main.runService in goroutine 1
github.com/evanw/esbuild/cmd/esbuild/service.go:122 +0x2c7
Command
new
Is this a regression?
The previous version in which this bug was not present was
21
Description
On a fresh Angular 22 project, after running
ng new, 2 different versions ofesbuildare present innode_modules. It looks like it can cause issues.Minimal Reproduction
Create a new Angular 22 project with
ng new, then runnpm ls esbuild:Compared to a previous version, here with Angular 21.2.8:
Your Environment
Anything else relevant?
In our pipeline we run two
ng buildin parallel. Most of the time we get the following error, and a github issue search seem to indicate that this may be caused by multipleesbuildversions: