Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aspnetcore with angular error NodeInvocationException: The Node invocation timed out after 60000ms

i'm using yo generator-aspnetcore-spa once i run the app i got problem

An unhandled exception occurred while processing the request.

NodeInvocationException: The Node invocation timed out after 60000ms. You can change the timeout duration by setting the InvocationTimeoutMilliseconds property on NodeServicesOptions.

The first debugging step is to ensure that your Node.js function always invokes the supplied callback (or throws an exception synchronously), even if it encounters an error. Otherwise, the .NET code has no way to know that it is finished or has failed. Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance+d__13.MoveNext()

NodeInvocationException: The Node invocation timed out after 60000ms. You can change the timeout duration by setting the InvocationTimeoutMilliseconds property on NodeServicesOptions. The first debugging step is to ensure that your Node.js function always invokes the supplied callback (or throws an exception synchronously), even if it encounters an error. Otherwise, the .NET code has no way to know that it is finished or has failed.

and red color on this line

AspNetCore._Views_Home_Index_cshtml+d__31.MoveNext() in Index.cshtml + ViewData["Title"] = "Home Page";

this is how my package.json look like

{
  "name": "WebApplicationBasic",
  "version": "0.0.0",
  "dependencies": {
    "@angular/animations": "^4.3.0",
    "@angular/common": "^4.3.0",
    "@angular/compiler": "^4.3.0",
    "@angular/core": "^4.3.0",
    "@angular/forms": "^4.3.0",
    "@angular/http": "^4.3.0",
    "@angular/platform-browser": "^4.3.0",
    "@angular/platform-browser-dynamic": "^4.3.0",
    "@angular/platform-server": "^4.3.0",
    "@angular/router": "^4.3.0",
    "@types/node": "^7.0.38",
    "angular2-template-loader": "^0.6.2",
    "aspnet-prerendering": "^2.0.6",
    "aspnet-webpack": "^1.0.29",
    "awesome-typescript-loader": "^3.2.1",
    "bootstrap": "^3.3.7",
    "css": "^2.2.1",
    "css-loader": "^0.28.4",
    "es6-shim": "^0.35.3",
    "event-source-polyfill": "0.0.9",
    "expose-loader": "^0.7.3",
    "extract-text-webpack-plugin": "^2.1.2",
    "file-loader": "^0.11.2",
    "html-loader": "^0.4.5",
    "isomorphic-fetch": "^2.2.1",
    "jquery": "^3.2.1",
    "json-loader": "^0.5.4",
    "ng-snotify": "^2.0.3",
    "ngx-cookie": "^1.0.0",
    "preboot": "^4.5.2",
    "raw-loader": "^0.5.1",
    "reflect-metadata": "^0.1.10",
    "rxjs": "^5.4.2",
    "style-loader": "^0.17.0",
    "to-string-loader": "^1.1.5",
    "typescript": "^2.4.1",
    "url-loader": "^0.5.9",
    "webpack": "^2.7.0",
    "webpack-hot-middleware": "^2.18.2",
    "webpack-merge": "^4.1.0",
    "zone.js": "^0.8.14"
  }
}

my app was work fine and i don't no what is the reason of this problem

like image 734
Ahmed Magdy Avatar asked Aug 12 '26 06:08

Ahmed Magdy


1 Answers

We host our site in Azure and the solution for me was to add this config key/value to the Application settings.

Key: WEBSITE_NODE_DEFAULT_VERSION
Value: 6.9.1

I suppose you could also add it to your appsetting.json or web.config as well.

like image 99
Jason Dean Avatar answered Aug 14 '26 22:08

Jason Dean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!