microsoft / microsoft/azurechat

Dockerfile RUN yarn build fails related to @azure/storage-blob package

Open
#392 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.4k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
1

Description

When building the app with the Dockerfile, the line RUN yarn build fails.

The workaround I found was to lock "@azure/storage-blob": "12.18.0" in package.json, then the docker image can build successfully.

Question: Is there a better solution for this? Like a solution that doesn't require strictly locking to a specific version, and one that will allow for future updated azure packages, just like it was before?

Otherwise, with versions higher such as @azure/storage-blob@12.23.0 the error logs show:

#16 50.70 TypeError: coreTracing.createTracingClient is not a function
#16 50.70     at Object.<anonymous> (/app/node_modules/@azure/storage-blob/dist/index.js:15265:35)
#16 50.70     at Module._compile (node:internal/modules/cjs/loader:1358:14)
#16 50.70     at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
#16 50.70     at Module.load (node:internal/modules/cjs/loader:1208:32)
#16 50.70     at Module._load (node:internal/modules/cjs/loader:1024:12)
#16 50.70     at Module.require (node:internal/modules/cjs/loader:1233:19)
#16 50.70     at mod.require (/app/node_modules/next/dist/server/require-hook.js:65:28)
#16 50.70     at require (node:internal/modules/helpers:179:18)
#16 50.70     at 91322 (/app/.next/server/app/(authenticated)/api/images/route.js:1:1515)
#16 50.70     at t (/app/.next/server/webpack-runtime.js:1:128)
#16 50.70 
#16 50.70 > Build error occurred
#16 50.71 Error: Failed to collect page data for /api/images
#16 50.71     at /app/node_modules/next/dist/build/utils.js:1220:15
#16 50.71     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
#16 50.71   type: 'Error'
#16 50.71 }
#16 50.86 error Command failed with exit code 1.
#16 50.86 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#16 ERROR: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1
------
 > [builder 4/4] RUN yarn build:
50.70     at t (/app/.next/server/webpack-runtime.js:1:128)
50.70 
50.70 > Build error occurred
50.71 Error: Failed to collect page data for /api/images
50.71     at /app/node_modules/next/dist/build/utils.js:1220:15
50.71     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
50.71   type: 'Error'
50.71 }
50.86 error Command failed with exit code 1.
50.86 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
dockerfile:34
--------------------
  32 |     # ENV NEXT_TELEMETRY_DISABLED 1
  33 |     
  34 | >>> RUN yarn build
  35 |     
  36 |     # If using npm comment out above and use below instead
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dependency versions in package.json and the failing RUN yarn build step in the Dockerfile. Reproduce the failure for newer @azure/storage-blob versions and inspect the related coreTracing dependency used by the /api/images route. Done means the Docker image builds successfully without strictly pinning @azure/storage-blob to 12.18.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, docker, next.js, typescript
Domain
backend, build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.