Open Ahmed-Elbadry99 opened 2 months ago
This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app
and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
This might be related to your directory structure so its really important to get an accurate repro to diagnose this.
every time i create new project i got this error
In that case, it's likely something to do with the environment.
We get this error:
[error] Error: The service was stopped
at [...]\node_modules\esbuild\lib\main.js:993:26
...
as well, when we abort ng serve
mid build via CTRL+c
. Happens since we upgraded to 18.2.0. Seems like esbuild
is not a good citizen here and is confused when the cli is mid-shutdown and throws its own error. Maybe some parts of esbuild
are disposed/stopped, but not all of it.
Maybe for you something else fails, but the real error doesn't surface because esbuild
does still zombie around until it kills the cli with its own error.
I'm facing same issue with Angular cli 17.3.9 ESbuild. Node.js v 20.16.0
Reporting the same issue with Angular cli and build v17.3.5 and Node.js v20.9.0.
In our case, the initial build completes successfully, the dev server runs on initial load, and then the esbuild error occurs after file changes are made during the rebuild.
[error] Error: The service was stopped
at [...]\node_modules\esbuild\lib\main.js:1111:28
at responseCallbacks.<computed> ([...]\node_modules\esbuild\lib\main.js:704:9)
at Socket.afterClose ([...]\node_modules\esbuild\lib\main.js:694:28)
at Socket.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1408:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
I have the same problem in Angular 18.1.4
It works fine for a while and suddenly when saving a change... BAM!
An unhandled exception occurred: The service was stopped
See "C:\Users\XYZ\AppData\Local\Temp\ng-Tpr6IX\angular-errors.log" for further details.
[error] Error: The service was stopped
at C:\Repos\MyApp\MyApp.Angular\node_modules\esbuild\lib\main.js:993:26
at responseCallbacks.<computed> (C:\Repos\MyApp\MyApp.Angular\node_modules\esbuild\lib\main.js:622:9)
at Socket.afterClose (C:\Repos\MyApp\MyApp.Angular\node_modules\esbuild\lib\main.js:613:28)
at Socket.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Facing the same issue, using angular-cli v17.3.2, Node v20.17.0 The issue started coming up after upgrading system from windows 10 to windows 11. The project works fine on systems which are still on windows 10 but whoever has upgraded to windows 11 are facing this issue:
[error] Error: The service was stopped at <path>\node_modules\esbuild\lib\main.js:1111:28 at responseCallbacks.<computed> (<path>\node_modules\esbuild\lib\main.js:704:9) at Socket.afterClose (<path>\node_modules\esbuild\lib\main.js:694:28) at Socket.emit (node:events:531:35) at endReadableNT (node:internal/streams/readable:1696:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Command
build, serve
Is this a regression?
The previous version in which this bug was not present was
17
Description
when i run server i got this message An unhandled exception occurred: The service was stopped See "C:\Users\AE6CA~1.ELB\AppData\Local\Temp\ng-51TnuX\angular-errors.log" for further details.
Minimal Reproduction
ok
Exception or Error
Your Environment
Anything else relevant?
no