Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

[Bug] Docker Build failing at yarn run build

Open highoncarbs opened this issue 8 months ago • 11 comments

Describe the Bug

I am building the docker image as described in the documentation. I did a fresh git clone and ran docker build. It fails to build the image, but a regular yarn run build is building the Viewer

Here's the error

44.68 @ohif/app: Circular dependency between chunks with runtime (app, polySeg, suv-peak-worker)
44.68 @ohif/app: This prevents using hashes of each other and should be avoided.
44.68 @ohif/app: ERROR in ../../../extensions/default/src/getCustomizationModule.tsx 3:0-83
44.68 @ohif/app: Module not found: Error: Can't resolve './components/ProgressDropdownWithService' in '/usr/src/app/extensions/default/src'
44.68 @ohif/app: Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".js",".jsx",".json",".ts",".tsx",".*"]' instead of '[".js",".jsx",".json",".ts",".tsx","*"]'?
44.68 @ohif/app: resolve './components/ProgressDropdownWithService' in '/usr/src/app/extensions/default/src'
44.68 @ohif/app:   using description file: /usr/src/app/extensions/default/package.json (relative path: ./src)
44.68 @ohif/app:     Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:     using description file: /usr/src/app/extensions/default/package.json (relative path: ./src/components/ProgressDropdownWithService)
44.68 @ohif/app:       no extension
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService doesn't exist
44.68 @ohif/app:       .js
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.js doesn't exist
44.68 @ohif/app:       .jsx
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.jsx doesn't exist
44.68 @ohif/app:       .json
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.json doesn't exist
44.68 @ohif/app:       .ts
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.ts doesn't exist
44.68 @ohif/app:       .tsx
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.tsx doesn't exist
44.68 @ohif/app:       *
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService* doesn't exist
44.68 @ohif/app:       as directory
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService doesn't exist
44.68 @ohif/app:  @ ../../../extensions/default/src/index.ts 9:0-62 42:2-24
44.68 @ohif/app:  @ ./pluginImports.js
44.68 @ohif/app:  @ ./index.js 19:0-89 33:4-21 34:4-16
44.68 @ohif/app: ERROR in ../../../extensions/default/src/getToolbarModule.tsx 6:0-83
44.68 @ohif/app: Module not found: Error: Can't resolve './components/ProgressDropdownWithService' in '/usr/src/app/extensions/default/src'
44.68 @ohif/app: Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".js",".jsx",".json",".ts",".tsx",".*"]' instead of '[".js",".jsx",".json",".ts",".tsx","*"]'?
44.68 @ohif/app: resolve './components/ProgressDropdownWithService' in '/usr/src/app/extensions/default/src'
44.68 @ohif/app:   using description file: /usr/src/app/extensions/default/package.json (relative path: ./src)
44.68 @ohif/app:     Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:     using description file: /usr/src/app/extensions/default/package.json (relative path: ./src/components/ProgressDropdownWithService)
44.68 @ohif/app:       no extension
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService doesn't exist
44.68 @ohif/app:       .js
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.js doesn't exist
44.68 @ohif/app:       .jsx
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.jsx doesn't exist
44.68 @ohif/app:       .json
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.json doesn't exist
44.68 @ohif/app:       .ts
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.ts doesn't exist
44.68 @ohif/app:       .tsx
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService.tsx doesn't exist
44.68 @ohif/app:       *
44.68 @ohif/app:         Field 'browser' doesn't contain a valid alias configuration
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService* doesn't exist
44.68 @ohif/app:       as directory
44.68 @ohif/app:         /usr/src/app/extensions/default/src/components/ProgressDropdownWithService doesn't exist
44.68 @ohif/app:  @ ../../../extensions/default/src/index.ts 5:0-50 30:2-18
44.68 @ohif/app:  @ ./pluginImports.js
44.68 @ohif/app:  @ ./index.js 19:0-89 33:4-21 34:4-16
44.68 @ohif/app: webpack 5.91.0 compiled with 2 errors and 1 warning in 34380 ms (cedfee9b9afaf58c5a09)
@ohif/app: error Command failed with exit code 1.
@ohif/app: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@ohif/app: error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
44.93
44.93
44.93
44.93  >  Lerna (powered by Nx)   Running target build:viewer for project @ohif/app failed
44.93
44.93    Failed tasks:
44.93
44.93    - @ohif/app:build:viewer
44.93
44.93    Hint: run the command with --verbose for more details.
44.93
44.96 error Command failed with exit code 1.
44.96 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
Dockerfile:61
--------------------
  59 |     # ENV REACT_APP_CONFIG=config/default.js
  60 |
  61 | >>> RUN yarn run build
  62 |
  63 |     # Stage 3: Bundle the built application into a Docker container
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn run build" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/default/default/g3vbyke2uro0kp7v0hbs3gvrl

Steps to Reproduce

docker build . -t ohif

The current behavior

Failing at yarn run build

The expected behavior

Should build an image

OS

Windows 11

Node version

20

Browser

Latest Chrome and edge

highoncarbs avatar May 24 '24 13:05 highoncarbs