Friday 5 May 2017

azure web app node.js deployment configuration error

I am having a bit of trouble deploying a super basic node.js app to an azure web app (app service).

The app is working fine locally, and I was able to deploy the same code fine last week, however, when attempting to follow the same steps this week I have been unsuccssful even though the same code base is used; I am not sure if I have forgotten a step or if there might be another issue.

Basically I am using someones mock from github (https://github.com/pe1234/azure-moc-web) and I have created a brand new web app on a standard app service and configured the deployment options so it is connected to this repo. It pulls the code fine and seems to deploy all the required node modules. However, when I send a valid get request I get a 500 error and the logging-error.txt file on the web app seems to throw the following error message everytime it gets a request:

Fri May 05 2017 14:16:01 GMT+0000 (Coordinated Universal Time): Application has thrown an uncaught exception and is terminated:
SyntaxError: Unexpected token >
    at Module._compile (module.js:434:25)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)
    at Function._load (module.js:311:12)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at Object.<anonymous> (D:\Program Files (x86)\iisnode\interceptor.js:459:1)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)

Are there any steps that need to be completed to deploy an express node app? At the moment all I am doing is deploying the code via a git sync.

It is the exact same code as last week and I have been through each file and there are no errornous > symbols from what I can see.

Hence, I am assuming it is a configuration issue, or maybe a bad version of a module; the error message isn't very helpful.

Any advice would be greatly appreciated.



via Pectus Excavatum

No comments:

Post a Comment