Issue
I am using the latest version of Visual Studio 2022, which is 17.2.6.
If I create a new project of the type "Standalond Typescript Angular Project", make no modifications whatsoever and try to start the project, then it opens a console window with title ngcc and (after a while) shows the following content:
> angularproject1@0.0.0 start
> ng serve
√ Browser application bundle generation complete.
Initial Chunk Files | Names | Size
vendor.js | vendor | 1.67 MB
polyfills.js | polyfills | 336.18 kB
styles.css, styles.js | styles | 212.40 kB
main.js | main | 53.50 kB
runtime.js | runtime | 6.87 kB
| Initial Total | 2.26 MB
Build at: 2022-07-16T15:17:53.888Z - Hash: ad802c438fec0f97 - Time: 12103ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
√ Compiled successfully.
At this point I can open the address http://localhost:4200/ in a browser and it loads the page correctly.
However, Visual Studio gets stuck showing the text "Deploy started..." in the status bar.
The Visual Studio output window has the following content:
Build started...
1>------ Build started: Project: angularproject1, Configuration: Debug Any CPU ------
2>------ Deploy started: Project: angularproject1, Configuration: Debug Any CPU ------
If I abort the program in the console, the Visual Studio shows the message
There were deployment errors. Continue?
In another scenario, I have created a solution with two new projects:
- "Standalond Typescript Angular Project"
- "ASP.NET Core Web API"
and made them both startup projects (with the Web APU starting first). This is the scenario that I actually want to use.
In this case I get exactly the same effect, but the single "Standalond Typescript Angular Project" seems to be the easiest way to reproduce the problem.
Why is Visual Studio hanging up in the deployment step?
EDIT
I have made another test, exactly following the instructions on the following page:
The behavior is identical, Visual Studio hangs up waiting for the deployment to be completed.
Solution
Had the exact problem. The fix for me was to install a different Node version.
Using the nvm version manager for Node I was able to install the latest using:
nvm install lts
In my case, it installed v16.16.0. Then I set as current using:
nvm use v16.16.0
Answered By - Anton
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.