Skip to content

[Bug] docker image build gives error related to ajv version mismatch #5483

@Ujjwal766

Description

@Ujjwal766

Describe the Bug

While building the docker image out of the beta image, its giving error due to ajv version mismatch.

With below error

=> ERROR [builder 13/15] RUN bun run build 4.3s

[builder 13/15] RUN bun run build:
0.377 $ lerna run build:viewer --stream
1.325 info cli using local version of lerna
1.331 lerna notice cli v7.4.2
2.263
2.263 > @ohif/app:"build:viewer"
2.263
@ohif/app: yarn run v1.22.22
$ cross-env NODE_ENV=production yarn run build
@ohif/app: $ node --max_old_space_size=8096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js
4.200 @ohif/app: [webpack-cli] Error: Cannot find module 'ajv/dist/compile/codegen'
4.200 @ohif/app: Require stack:
4.200 @ohif/app: - /usr/src/app/node_modules/ajv-keywords/dist/definitions/typeof.js
4.200 @ohif/app: - /usr/src/app/node_modules/ajv-keywords/dist/keywords/typeof.js
4.200 @ohif/app: - /usr/src/app/node_modules/ajv-keywords/dist/keywords/index.js
4.200 @ohif/app: - /usr/src/app/node_modules/ajv-keywords/dist/index.js
4.200 @ohif/app: - /usr/src/app/node_modules/schema-utils/dist/validate.js
4.200 @ohif/app: - /usr/src/app/node_modules/schema-utils/dist/index.js
4.200 @ohif/app: - /usr/src/app/node_modules/terser-webpack-plugin/dist/index.js
4.201 @ohif/app: - /usr/src/app/.webpack/webpack.base.js
4.201 @ohif/app: - /usr/src/app/platform/app/.webpack/webpack.pwa.js
4.201 @ohif/app: - /usr/src/app/node_modules/webpack-cli/lib/webpack-cli.js
4.201 @ohif/app: - /usr/src/app/node_modules/webpack-cli/lib/bootstrap.js
4.201 @ohif/app: - /usr/src/app/node_modules/webpack-cli/bin/cli.js
4.201 @ohif/app: - /usr/src/app/node_modules/webpack/bin/webpack.js
4.201 @ohif/app: at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
4.201 @ohif/app: at Module._load (node:internal/modules/cjs/loader:1051:27)
4.201 @ohif/app: at Module.require (node:internal/modules/cjs/loader:1311:19)
4.201 @ohif/app: at require (node:internal/modules/helpers:179:18)
4.201 @ohif/app: at Object. (/usr/src/app/node_modules/ajv-keywords/dist/definitions/typeof.js:3:19)
4.201 @ohif/app: at Module._compile (node:internal/modules/cjs/loader:1469:14)
4.201 @ohif/app: at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
4.201 @ohif/app: at Module.load (node:internal/modules/cjs/loader:1288:32)
4.201 @ohif/app: at Module._load (node:internal/modules/cjs/loader:1104:12)
4.201 @ohif/app: at Module.require (node:internal/modules/cjs/loader:1311:19) {
4.201 @ohif/app: code: 'MODULE_NOT_FOUND',
4.201 @ohif/app: requireStack: [
4.201 @ohif/app: '/usr/src/app/node_modules/ajv-keywords/dist/definitions/typeof.js',
4.201 @ohif/app: '/usr/src/app/node_modules/ajv-keywords/dist/keywords/typeof.js',
4.201 @ohif/app: '/usr/src/app/node_modules/ajv-keywords/dist/keywords/index.js',
4.201 @ohif/app: '/usr/src/app/node_modules/ajv-keywords/dist/index.js',
4.201 @ohif/app: '/usr/src/app/node_modules/schema-utils/dist/validate.js',
4.201 @ohif/app: '/usr/src/app/node_modules/schema-utils/dist/index.js',
4.201 @ohif/app: '/usr/src/app/node_modules/terser-webpack-plugin/dist/index.js',
4.201 @ohif/app: '/usr/src/app/.webpack/webpack.base.js',
4.201 @ohif/app: '/usr/src/app/platform/app/.webpack/webpack.pwa.js',
4.201 @ohif/app: '/usr/src/app/node_modules/webpack-cli/lib/webpack-cli.js',
4.201 @ohif/app: '/usr/src/app/node_modules/webpack-cli/lib/bootstrap.js',
4.201 @ohif/app: '/usr/src/app/node_modules/webpack-cli/bin/cli.js',
4.201 @ohif/app: '/usr/src/app/node_modules/webpack/bin/webpack.js'
4.201 @ohif/app: ]
4.201 @ohif/app: }
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
4.243
4.243
4.243
4.243 > Lerna (powered by Nx) Running target build:viewer for project @ohif/app failed
4.243
4.243 Failed tasks:
4.243
4.243 - @ohif/app:build:viewer
4.243
4.243 Hint: run the command with --verbose for more details.
4.243
4.251 error: script "build" exited with code 1


ERROR: failed to build: failed to solve: process "/bin/sh -c bun run build" did not complete successfully: exit code: 1

Steps to Reproduce

clone latest beta repo
do "docker build -t ohif ."

The current behavior

Image build leads to failure

The expected behavior

Image build should be successful

System Information

window 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions