-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy a Vue application to Azure App service through VS code not success #51639
Comments
Thanks for the feedback @yejiyang! We are currently investigating and will update you shortly. |
https://docs.microsoft.com/en-us/visualstudio/javascript/publish-nodejs-app-azure?view=vs-2019. I would makes sure ssh into the container and check the container logs to see if your npm install - package.json is loaded as well as FTP into the site and check the components of the /wwwroot folder. If need more help I suggest support ticket the App Service OSS team will be glad to help you. |
@kfolkes Hey, thanks for the reply. root@xxx:/home/site/wwwroot# ls -h And inside the dist folder, the generate files from build exists. It looks like this issue has been reported before. See this stack question How I can get help from App Service OSS team? |
I definitely ran into issues myself @yejiyang when following the tutorial. I'll reach out to the doc author to see about updating. I was able to workaround by not using VS Code to create the app. In the terminal, I ran |
@kraigb FYI |
@yejiyang @cephalin I saw a similar issue with a Python app (https://github.com/MicrosoftDocs/azure-dev-docs/issues/124). Try this: in App Service, go to Settings > Configuration (or in VS Code right click the "Application Settings" node in the Azure App Service explorer) and look for SCM_DO_BUILD_DURING_DEPLOYMENT. There should be a setting by this name with the value of true, which forces an npm install during deployment. |
@kraigb I tried to set SCM_DO_BUILD_DURING_DEPLOYMENT both in App Service or VS Code (Linux version). |
@msangapu-msft have you been able to test this process again? |
Same happening to me. Not with VS Code, but doing all the deploy process with Azure CLI I have the same situation. The source code is in wwwroot, but still with the "Hey node developers" homepage. |
@higoorc do you have |
Still the same. |
I'm facing the same problem, I tried the |
In the Configuration Startup Command field I added { //...
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
}
/...} When making this change the page now loads as The actions log suggests this change was informational only. It does not prompt any rebuild. { //...
"eventTimestamp": "2020-10-23T18:50:02.4336596Z",
"id": "/subscriptions/a946d5b7-8c5a-4a26-b689-f42cbf70ec50/resourceGroups/appsvc_linux_centralus/providers/Microsoft.Web/sites/0f4ea263-66f7-4798-833f-828b74d2f536/config/slotconfignames/events/82839ad2-bd2b-4cf4-95d1-957d08bb593b/ticks/637390758024336596",
"level": "Informational",
"operationId": "1597108f-6a0b-4f9d-b31d-66c9a45251af",
"operationName": {
"value": "Microsoft.Web/sites/config/write",
"localizedValue": "Update web sites config" /...
} I can try to trigger the build again to see what happens. Wouldn't this affect all node.js apps? What's the test plan for different commands, what is this Kudu build thing, can we create any local tests to try and test whether using Azure Web App will fail before trying to deploy there? |
This worked for me: https://azureossd.github.io/2020/04/30/run-production-build-on-app-service-linux/ Add the following start up command under general settings in the portal: pm2 serve /home/site/wwwroot/dist --no-daemon After this I restarted my site, and after 5 mins the vue page displayed. It DID take a few minutes for the change to take place, I almost wrote it off. |
Is there an official solution to this? I'm struggling to deploy anything other than a static Vue site. Update: I managed to correct the issue by adding: npx serve -s in the startup command. |
I'm deploying my Vue app via Azure Dev Ops to an Azure App Service running Linux and adding this start up command fixed my issue immediately. Thanks so much for sharing this, I've been struggling to get it to show anything other than the standard welcome page for a day now. I haven't seen this mentioned anywhere in MSFT docs so it should probably be referenced in some of the documentation surrounding building and publishing a Vue app to Azure App Service whether its from VS Code or from Azure Dev Ops. If it helps here is my yml file for the pipeline I have setup to build and package my Vue app.
|
Spent lots of time on it..... New to frontend, just to finish a course design.
it works for me. hope it can save time for anyone who needed. |
Hi all, we have a new product called Static web apps that may simplify some of this: https://docs.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vue |
This requires a Github account. Some company don't have Github accounts, so I can't simply use my personal Github account just to deploy. Please fix Azure App Service and not force people to use the Azure Static Web App (or at least remove the Github account requirement!) |
Hi @yejiyang Are you still having this issue? The tutorial you linked was updated recently: https://docs.microsoft.com/en-us/azure/developer/javascript/tutorial/deploy-nodejs-azure-app-service-with-visual-studio-code?tabs=bash If you're still having issues, which steps do you need help with? |
Hi @yejiyang Are you still having issues? Can you please clarify which step? |
#please-close as the issue is old and also not directly related to the content issues but a specific JS framework (Vue.js). |
I followed this tutorial this tutorial to deploy to Azure App Service using Visual Studio Code. It works nice.
When I try to deploy a Vue application (I create a HelloWorld Vue application from Vue-Cli ), all seems work until I open the final website. I see a page said "Hey, Node developers! Your app service is up and running. Time to take the next step and deploy your code".
Any suggestions how I can move forward?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: