16 ERROR: process "/bin/sh -c npm run build" did not complete successfully: exit code: 2
[11/11] RUN npm run build:
0.315
0.315 > backend@1.0.0 build /usr/src/app
0.315 > tsc
0.315
4.406 node_modules/@types/lodash/common/object.d.ts(1026,46): error TS1005: '?' expected.
ERR! A complete log of this run can be found in:
4.524 npm ERR! /root/.npm/_logs/2024-07-31T06_32_03_045Z-debug.log
4 warnings found (use docker --debug to expand):
JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 38)
FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)
LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 5)
LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 22)
Dockerfile:29
27 |
28 | COPY . .
29 | >>> RUN npm run build
30 |
31 | ENV NODE_ENV=production
ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 2
ERROR: Job failed: Process exited with status 1
step1: npm i
step 2:npm run build
16 4.406 node_modules/@types/lodash/common/object.d.ts(1026,46): error TS1005: '?' expected.
16 4.407 node_modules/@types/lodash/common/object.d.ts(1031,46): error TS1005: '?' expected.
16 4.407 node_modules/@types/lodash/common/object.d.ts(1041,46): error TS1005: '?' expected.
step2 shows error
completely log info
16 [11/11] RUN npm run build
16 0.315
16 0.315 > backend@1.0.0 build /usr/src/app
16 0.315 > tsc
16 0.315
16 4.406 node_modules/@types/lodash/common/object.d.ts(1026,46): error TS1005: '?' expected.
16 4.407 node_modules/@types/lodash/common/object.d.ts(1031,46): error TS1005: '?' expected.
16 4.407 node_modules/@types/lodash/common/object.d.ts(1041,46): error TS1005: '?' expected.
16 4.482 npm ERR! code ELIFECYCLE
16 4.483 npm ERR! errno 2
16 4.484 npm ERR! backend@1.0.0 build:
tsc
16 4.484 npm ERR! Exit status 2
16 4.484 npm ERR!
16 4.484 npm ERR! Failed at the backend@1.0.0 build script.
16 4.484 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
16 4.523
16 4.523 npm ERR! A complete log of this run can be found in:
16 4.524 npm ERR! /root/.npm/_logs/2024-07-31T06_32_03_045Z-debug.log
16 ERROR: process "/bin/sh -c npm run build" did not complete successfully: exit code: 2