Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

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

Closed
changhuixu opened this issue May 8, 2018 · 2 comments

Comments

@changhuixu
Copy link

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,

@changhuixu
Copy link
Author

Dependencies:
(1)

<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="2.0.0" />

(2)

<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.2" />

@SteveSandersonMS
Copy link
Member

Angular 6 support is being tracked at aspnet/Templating#515. It's not something we have specific instructions or support for until that feature ships. Hope that's OK.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants