Azure deployment: 500 Internal Server Error
Hi Steve, sorry if it's a dummy question, but I am trying to publish your yeoman template on Azure and I get a 500 error for the RC1 version and a 403 for the RC2 version.
Both templates work running IIS Express.
I tried to publish on my PC to see if I could get more info about the errors and it works for RC2 but I get the 500 error for RC1.
My pc has windows 10 with a dnvm version 1.0.0-rc1-15540 and 1.0.0-rc1-final clr x86 as default (Microsoft .NET Execution environment Clr-x86-1.0.0-rc1-16202).
RC1 Steps (publishing in localhost):
- Publish with Visual Studio 2015.
- Then run the web.cmd.
- When I load the site in "localhost:5000" the console throws the following error
Call to Node module failed with error: To use prerendering, you must install the 'aspnet-prerendering' NPM package
- If I copy the node_modules folder I get the following error
Cannot find module './wwwroot/dist/vendor-manifest.json'
but file does exist and I have webpack installed globally and working when running IIS Express.
Is there any documentation I could review before asking here?
Hi, @manuelreina, you need to copy './wwwroot/dist/vendor-manifest.json' file on server (this one can builded with webpack --config webpack.config.vendor.js). In a fact this task is redundant see #96. If you change webpack.config.js and exclud dll reference everything should work fine.
Sorry for late response.
Thank you very much @laskoviymishka for your response.
I am newbie with Azure so I tried to play changing a few settings in order to get the last version of node running but it didn't work, that's why I tried to replicate the error publishing in localhost:5000. After getting the same error I found out that the node_modules folder wasn't being copied over, but after copying it I get the error
Cannot find module './wwwroot/dist/vendor-manifest.json'
I know there is something I am missing, but the file './wwwroot/dist/vendor-manifest.json' is in both environments Azure and localhost:5000.
It works like a charm in IIS Express and that's why I am eager to publish it.
Any clue?
Thank you.
@manuelreina you may try to refactor webpack.config to not use vendor-manifest.json (as it described in #96). It should help.
Thank you @laskoviymishka I should have done it before in your first comment. Now it's working publishing in http://localhost:5000 but I am still getting errors on Azure. I have to learn more about Azure and the Visual Studio deployment. I have changed the node version successfully but get an error running "npm install" manually as the Visual Studio deployment throws an error. I will post as soon as I have more info.
Thanks.
As I had problems running the "npm install" with Visual Studio, I tried to do it manually on Azure, but I had the following error.
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
I finally have it working by changing the azure node version to 5.5.0 with its corresponding npm version to 3.3.12.
Hope it helps someone.
Thanks @laskoviymishka