LyphTEC
LyphTEC

Reputation: 1029

Issue running Node app on Azure App Service with engines greater than 6.0.0

There seems to be an Azure issue running Node apps with engines greater than 6.0.0.

It comes up with an error similar to the following:

Error: Not Found
at \\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\config\express.js:36:15
at Layer.handle [as handle_request] (\\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (\\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\express\lib\router\index.js:312:13)
at \\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\express\lib\router\index.js:280:7
at Function.process_params (\\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\express\lib\router\index.js:330:12)
at next (\\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\express\lib\router\index.js:271:10)
at methodOverride (\\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\method-override\index.js:65:14)
at Layer.handle [as handle_request] (\\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (\\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\express\lib\router\index.js:312:13)
at \\100.72.114.39\volume-10-default\bc07ff16757397422510\c76bdd71a9f84626a73576980337b6ce\site\wwwroot\node_modules\express\lib\router\index.js:280:7

Steps to reproduce:

  1. Follow this tutorial
  2. Site runs normally with no engines specified (defaults to 4.2.3 as of this post)
  3. Change the engines field to 6.2.2 or 6.3.0 --> fails.

FYI it runs OK with 6.0.0

Upvotes: 0

Views: 434

Answers (1)

Gary Liu
Gary Liu

Reputation: 13918

There is a similar issue with you on SO, Azure and node js __dirname.

And relate to https://github.com/nodejs/node/issues/7294, it seems that there was a change which altered the behavior of __dirname for mounted network shares when the Node.js version higher than 6.2.x .

Currently, the workaround is to downgrade the node.js version to the version under 6.2 in your Azure Web App.

Upvotes: 2

Related Questions