Skip to content
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

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

Open
michaelgrewal opened this issue Jun 9, 2024 · 0 comments

Comments

@michaelgrewal
Copy link

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/[email protected] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant