dotnet cli tool "dotnet watch run" or "dotnet run" cannot complete npm command #72

Closed
opened 2025-08-09 17:14:54 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @changhuixu on 5/8/2018

After update Angular to Version 6, I couldn't use dotnet cli command with "hot module reloading" feature. If I use visual studio 2017, the app can correctly launch and the webpage will reload if I edit contents. However, if I use dotnet cli, the npm build step stuck and the webpage will not reload when editing.

To reproduce error: clone repo https://github.com/changhuixu/dotnet-spa-service.git (This repo includes minimun .net core web app set up and Default Angular 6 app generated by angular cli v6.)

after npm install packages, issue command dotnet watch run in a console.

The console output is as follows,

PS C:\SolutionDir\OrderManager> dotnet watch run
watch : Started
Using launch settings from C:\SolutionDir\OrderManager\Properties\launchSettings.json...
Hosting environment: Development
Content root path: C:\SolutionDir\OrderManager
Now listening on: http://localhost:63056
Application started. Press Ctrl+C to shut down.
npm 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 13% building modules 27/42 modules 15 active …lar\node_modules\html-entities\index.j
 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17% building modules 63/71 modules 8 active …\node_modules\webpack\buildin\module.j
 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 21% building modules 97/102 modules 5 active …ode_modules\core-js\modules\_iobject.
 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 25% building modules 128/135 modules 7 active …odules\rxjs\_esm5\internal\Scheduler.j
 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 25% building modules 128/199 modules 71 active …\rxjs\_esm5\internal\operators\first.
 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 29% building modules 163/227 modules 64 active …xjs\_esm5\internal\util\TimeoutError.js
 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 37% building modules 226/228 modules 2 active …rxjs\_esm5\internal\operators\zipAll.j
 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 40% building modules 257/261 modules 4 active …ules\rxjs\_esm5\internal\util\isDate.j
 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 41% building modules 263/318 modules 55 active …m5\internal\util\subscribeToIterable.js
 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 48% building modules 321/324 modules 3 active …modules\rxjs\_esm5\internal\util\not.j
 4 4

Expected behavior:
(1) npm script logs should be clean. I guess the first digit of build percentage gets output multiple times.
(2) npm script should finish run,

*Originally created by @changhuixu on 5/8/2018* After update Angular to Version 6, I couldn't use dotnet cli command with "hot module reloading" feature. If I use visual studio 2017, the app can correctly launch and the webpage will reload if I edit contents. However, if I use dotnet cli, the npm build step stuck and the webpage will not reload when editing. **To reproduce error:** clone repo https://github.com/changhuixu/dotnet-spa-service.git (This repo includes minimun .net core web app set up and Default Angular 6 app generated by angular cli v6.) after npm install packages, issue command ```dotnet watch run``` in a console. The console output is as follows, ```powershell PS C:\SolutionDir\OrderManager> dotnet watch run watch : Started Using launch settings from C:\SolutionDir\OrderManager\Properties\launchSettings.json... Hosting environment: Development Content root path: C:\SolutionDir\OrderManager Now listening on: http://localhost:63056 Application started. Press Ctrl+C to shut down. npm 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 13% building modules 27/42 modules 15 active …lar\node_modules\html-entities\index.j 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17% building modules 63/71 modules 8 active …\node_modules\webpack\buildin\module.j 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 21% building modules 97/102 modules 5 active …ode_modules\core-js\modules\_iobject. 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 25% building modules 128/135 modules 7 active …odules\rxjs\_esm5\internal\Scheduler.j 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 25% building modules 128/199 modules 71 active …\rxjs\_esm5\internal\operators\first. 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 29% building modules 163/227 modules 64 active …xjs\_esm5\internal\util\TimeoutError.js 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 37% building modules 226/228 modules 2 active …rxjs\_esm5\internal\operators\zipAll.j 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 40% building modules 257/261 modules 4 active …ules\rxjs\_esm5\internal\util\isDate.j 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 41% building modules 263/318 modules 55 active …m5\internal\util\subscribeToIterable.js 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 48% building modules 321/324 modules 3 active …modules\rxjs\_esm5\internal\util\not.j 4 4 ``` **Expected behavior:** (1) npm script logs should be clean. I guess the first digit of build percentage gets output multiple times. (2) npm script should finish run,
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#72
No description provided.