Một ngày đẹp trời team mình chạy build image với nodeJS bị lỗi.
[2022-05-05T11:16:47.316Z] [36mINFO[0m[0185] RUN lerna bootstrap [2022-05-05T11:16:47.316Z] [36mINFO[0m[0185] cmd: /bin/sh [2022-05-05T11:16:47.316Z] [36mINFO[0m[0185] args: [-c lerna bootstrap] [2022-05-05T11:16:47.316Z] [36mINFO[0m[0185] Running: [/bin/sh -c lerna bootstrap] [2022-05-05T11:16:47.630Z] lerna notice cli v4.0.0 [2022-05-05T11:16:47.630Z] lerna info Bootstrapping 3 packages [2022-05-05T11:16:47.630Z] lerna info Installing external dependencies [2022-05-05T11:17:34.501Z] lerna ERR! npm install exited 1 in 'nimtechnology-admin' [2022-05-05T11:17:34.502Z] lerna ERR! npm install stderr: [2022-05-05T11:17:34.502Z] npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it! [2022-05-05T11:17:34.502Z] npm ERR! cb() never called! [2022-05-05T11:17:34.502Z] [2022-05-05T11:17:34.502Z] npm ERR! This is an error with npm itself. Please report this error at: [2022-05-05T11:17:34.502Z] npm ERR! <https://npm.community> [2022-05-05T11:17:34.502Z] [2022-05-05T11:17:34.502Z] npm ERR! A complete log of this run can be found in: [2022-05-05T11:17:34.502Z] npm ERR! /root/.npm/_logs/2022-05-05T11_17_28_941Z-debug.log [2022-05-05T11:17:34.502Z] lerna ERR! npm install exited 1 in 'nimtechnology-admin' [2022-05-05T11:17:34.502Z] lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately. [2022-05-05T11:17:34.502Z] error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
Mình có lướt trên mạng thì thấy có 1 vài cách:
https://github.com/m-muhsin/celestial/issues/9
chúng ta cần upgrade npm lên bản mới h
npm install -g npm@latest
sudo rm -rf node_modules package-lock.json && npm install
Có cách nữa ở link bên dưới.
https://reactgo.com/npm-err-cb-never-called/
npm cache clean --force