0

I'm trying to release my project using Nodejs Express on Azure Dev Ops and Deploy on Release, but when I try to open the link. I'm getting a "The page cannot be displayed because an internal server error has occurred." error.

YAML: pool: name: Azure Pipelines steps:

  • task: NodeTool@0 displayName: 'Use Node 14.x' inputs: versionSpec: 14.x

  • task: Npm@1 displayName: 'npm install' inputs: verbose: false

  • task: Npm@1 displayName: 'npm custom' inputs: command: custom verbose: false customCommand: 'run build'

  • task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' inputs: PathtoPublish: '$(System.DefaultWorkingDirectory)'

Package Script Package Script

Webpack.config Webpack.config

and on Azure Pipeline Azure Pipeline the default setting of npm install and build

and on Azure Release Realease

All are working fine, on the build and release.

Blank Page blank

I'm starting to guess the problem was from the azure portal, or on the way it was setup. Because I didn't create the portal. I'm only the Contributor.

Please help clarify this.

I try to build all files on SCM \wwwroot

wwwroot

14
  • which operating system are you using Linux or windows ? Commented Jan 6, 2023 at 10:23
  • once please checked the version which you are using in azure -webapps and the version which in your local system are same. Commented Jan 6, 2023 at 10:38
  • Goto azure app -> click on configurations ->create new application settings -> then use the SCM_DO_BUILD_DURING_DEPLOYMENT=true and save the settings. after that try to redeploy the application. Commented Jan 6, 2023 at 11:42
  • 1.) I'm using windows. 2.) What do you mean by the version, the nodejs? 3.) I'll try to add SCM_DO_BUILD_DURING_DEPLOYMENT, then redeploy it Commented Jan 7, 2023 at 1:08
  • SCM_DO_BUILD_DURING_DEPLOYMENT added, after redeploy, it still the same error "The page cannot be displayed because an internal server error has occurred." Commented Jan 7, 2023 at 1:29

1 Answer 1

0
  • Make sure the index.js file is deployed to your azure app service

  • As you have some issues with your existing application Create the new application using this MS-DOC

  • Sign into Azure Pipelines. Your browser will go to to display your Azure DevOps dashboard.

  • Create New pipeline under the pipeline's menu of your project

  • Select GitHub as the source code location.

  • If the code is placed in GitHub, then login with Git Creds

  • When the list of repositories appears, select your sample Node.js repository.

  • Azure Pipelines analyzes the code in your repository and automatically gives a Node.js template for your pipeline. Select this template.

  • Azure Pipelines will automatically generates a YAML file in your pipeline. Click on Save and Run > Commit Directly to Master Branch and then choose Save ad Run again.

A new run begins. Wait for the run to complete.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.