NPM invoked on Angular page startup and crashes - asp.net

We have a couple of ASP.Net + Angular (.Net Core 2.1, Angular5) web pages on the IIS server that suddenly stopped working.
We get "AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: ))".
It seems that it attempts to run npm as the web is launched and it crashes. I tried to install Nodejs on the server and I can see the npm really starts, but crashes with mkdir operation not permitted. Anyway, I don't understand why it's started in the first place.
When start the same app on local IIS npm is not started and app runs without the problem.
We can't find what happened on the server. The same apps ran smoothly before.
Many thanks.
Michal

Solved. Colleagues set ASPNETCORE_ENVIRONMENT = DEVELOPMENT. Changing it back to Production fixed it.

Related

Web socket Exception crashing Blazor WASM while debugging in VS2022?

I'm having some trouble trying to get Blazor WASM debugging to work with VS2022 17.3.3 and was wondering if anyone on here could give me a hand/ had encountered this issue before?
When running any Blazor WASM project(I've tried with a fresh project as well) with the debugger, it will open correctly and run for about ~10-60s, before crashing and closing the browser. I get the following error in the debug console:
Console output of debug run
When running without debugger or via CLI the application runs without crashing.
I originally had an error in the browser identical to the one described here: https://learn.microsoft.com/en-us/answers/questions/741393/error-with-websocket.html but after disabling Hot Reload and Browser link this no longer started appearing, the crashing error still occurred though. Interestingly after re-enabling these settings the browser error has not reoccurred, and from what I can see hot reload isn't working at all when running with the debugger attatched.
Thanks for the help and happy to post any further details on my setup if anything else could be useful.

Can't open the Build logs when Vercel deploy fails at first try

I am trying to deploy a NextJs application to Vercel.
I followed steps in this tutorial: https://vercel.com/guides/nextjs-prisma-postgres and the deploy with that app works but with my new app doesn't.
On localhost my application runs just fine but when I'm trying to deploy on Vercel the deploy fails with message Deployment failed with error.
I'm trying to get the logs, to see why the deploy failed but I can't click on the Building part of the screen where I could see the build logs.
Picture of Vercel after Deploy failed:
My question is how could I see the logs if the Vercel deploy fails at first try?
I had the same problem. I couldn't deploy my app in Vercel and none error showed on the console. So, I run the npm run build locally and there it showed me some typescript errors that don't appear in any other place. After I solved those errors I could deploy my app in Vercel without problems.
I looked into it further, and to get some error information I used the vercel cli (https://vercel.com/docs/concepts/deployments/overview) instead of gui.
Hope this helps you to.

Batch File: Wait until multiple dotnet run commands are finished before launching browser shortcut

I have a batch file that executes:
start cmd /k dotnet run -p projectName
For two separate projects and then launches a shortcut link to the angular project in browser. The only (semi) problem is that the shortcut launches before the dotnet run commands have finished and so the browser believes the site cannot be reached until the dotnet run commands are complete.
I'm trying to not launch the shortcut link until both projects have finished executing the dotnet run command so the "This site can't be reached" dialog never shows up. I don't personally mind it, but it's rather confusing to anyone thinking the application should just open without the need for a reload.
EDIT:
The projects I'm running are a .NET Core Web API & .NET Core (Angular) Web App. The angular app get's compiled and served via dotnet run, but both projects need to remain running in order to listen to their specific ports. And the shortcut link executed at the end of the batch file is just to open the browser at localhost:AngularPort#. I understand a desktop app would have probably been the way to go from the start but for v2, the plan is to host in azure and allow customers to access the site as well instead of just being an internal app.
I found a solution on npm with a package called 'wait-on' which in my case will wait until an http(s) request on that url returns a response with a status code in the 200 range before completing. There's a whole other assortment of use-cases with this package but I only needed it for that.
Here's a link to the package if anyone else runs into this problem:
https://www.npmjs.com/package/wait-on
Edit:
Honestly this was only a problem because the laptop I needed to put the application on didn't have the best CPU stats, so it got hung up trying to serve a local api and angular application simultaneously.

Jenkins failed with error code 1062

My recent build on jenkins is failed with error :
AppCmd.exe exited on sitename.com with error code 1062.
All steps including checking out code, getting packages from nuget, npm, bower, sass compilation, application compilation, webpack compilation, minification & bundling, sql update is ran successfully and error occurs after that.
Faced it first time not sure what it is and how to resolve.
Application is using react, ASP.net, WebAPI and SQL server.
It was some issue in IIS. Somehow application pools were failed to start in IIs reset & application was not able to start. Started app pools manually & running jenkins worked fine afterwards.

MUP Deployed Site Not Displaying After Update

I used Meteor Up (MUP) to deploy my meteor app to a Digital Ocean droplet. I had some problems with deploying it the first time but I solved all of them and I got it working. I then made some updates to my app but when I deployed it again the page says "This webpage is not available". I have tried re-deploying the app on new droplets with different IP addresses but the same happens. I have run mup setup on each new droplet. It always says success for the setup and for the deployment but nothing shows up.
Can anybody tell me what I have done wrong?
It's likely there is some kind of error with your app, probably not related to deployment if it the issue occurs in the way your describe it.
You'll have to check your app's server side logs for a bit more info:
mup logs -f

Resources