Getting error on web app service for sveltekit 1.0 version

thomas magami 21 Reputation points
2023-03-29T19:48:01.6633333+00:00

Getting this error on app startup:-

2023-03-27T22:14:02.333Z ERROR - Container cal-med-emr_0_f47d3cb9 for site cal-med-emr has exited, failing site start

2023-03-27T22:14:04.220Z ERROR - Container cal-med-emr_0_f47d3cb9 didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.

2023-03-27T22:14:04.384Z INFO - Stopping site cal-med-emr because it failed during startup.

/home/LogFiles/2023_03_28_lw1sdlwk0000BK_default_docker.log (https://cal-med-emr.scm.azurewebsites.net/api/vfs/LogFiles/2023_03_28_lw1sdlwk0000BK_default_docker.log)

2023-03-28T16:34:02.966170577Z

2023-03-28T16:34:02.966176478Z Error: Cannot find module '/home/site/wwwroot/build'

2023-03-28T16:34:02.966181778Z at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)

2023-03-28T16:34:02.966186878Z at Function.Module._load (node:internal/modules/cjs/loader:841:27)

2023-03-28T16:34:02.966192178Z at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

2023-03-28T16:34:02.966212378Z at node:internal/main/run_main_module:22:47 {

2023-03-28T16:34:02.966217778Z code: 'MODULE_NOT_FOUND',

2023-03-28T16:34:02.966222579Z requireStack: []

2023-03-28T16:34:02.966227479Z }

/home/LogFiles/2023_03_28_lw1sdlwk0000BK_docker.log (https://cal-med-emr.scm.azurewebsites.net/api/vfs/LogFiles/2023_03_28_lw1sdlwk0000BK_docker.log)

2023-03-28T16:33:59.021Z INFO - Starting container for site

2023-03-28T16:33:59.023Z INFO - docker run -d --expose=8080 --name cal-med-emr_0_a507fee4 -e PORT=8080 -e WEBSITE_SITE_NAME=cal-med-emr -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=cal-med-emr.azurewebsites.net -e WEBSITE_INSTANCE_ID=db3f3781635e5140d0607cce3dbb8c4be6e04b9cc61c46d779039e60d16e0789 -e WEBSITE_USE_DIAGNOSTIC_SERVER=True appsvc/node:16-lts_20230228.2.tuxprod node build

2023-03-28T16:33:59.024Z INFO - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.

2023-03-28T16:34:01.176Z INFO - Initiating warmup request to container cal-med-emr_0_a507fee4 for site cal-med-emr

2023-03-28T16:34:03.550Z ERROR - Container cal-med-emr_0_a507fee4 for site cal-med-emr has exited, failing site start

2023-03-28T16:34:03.582Z ERROR - Container cal-med-emr_0_a507fee4 didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.

2023-03-28T16:34:03.643Z INFO - Stopping site cal-med-emr because it failed during startup.

/home/LogFiles/2023_03_29_lw1sdlwk000019_default_docker.log (https://cal-med-emr.scm.azurewebsites.net/api/vfs/LogFiles/2023_03_29_lw1sdlwk000019_default_docker.log)

2023-03-29T19:46:50.048071021Z

2023-03-29T19:46:50.048075321Z Error: Cannot find module '/home/site/wwwroot/build'

2023-03-29T19:46:50.048079722Z at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)

2023-03-29T19:46:50.048083922Z at Function.Module._load (node:internal/modules/cjs/loader:841:27)

2023-03-29T19:46:50.048088122Z at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

2023-03-29T19:46:50.048106422Z at node:internal/main/run_main_module:22:47 {

2023-03-29T19:46:50.048111022Z code: 'MODULE_NOT_FOUND',

2023-03-29T19:46:50.048114922Z requireStack: []

2023-03-29T19:46:50.048119022Z }

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,988 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,771 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 15,351 Reputation points Microsoft Employee
    2023-04-02T21:56:17.24+00:00

    The error message indicates that the container failed to start because it could not find the /home/site/wwwroot/build module. This could be due to a missing or incorrect configuration in your application. You can try the following steps to resolve the issue:

    1. Check if the build directory exists in your application's root directory. If it does not exist, you can try building your application again to generate the build directory.
    2. See if the build directory is included in your application's deployment package. If it is not included, you can try adding it to the deployment package and redeploying your application.
    3. Do you know if the build directory is specified as the root directory for your application in your application's configuration? If it is not specified, you can try adding it to the configuration and redeploying your application.
    4. Have you checked the PORT environment variable is set to 8080 in your application's configuration? If it is not set, you can try setting it to 8080 and redeploying your application.

    You can also check the container logs for more information on the error.

    Please let us know if this helps to resolve your issue. If not, reply here so we can assist you further.

    0 comments No comments