Docker Building Problem from Node 20.3 with Apple Silicon
mattiarainieri opened this issue · 3 comments
Starting from Node 20.3, building a container on Apple Silicon generate the following error.
I've install bcrypt through npm, not brew. Until Node version 20.2 no problem was being generated.
#0 6.758 npm ERR! code 126
#0 6.758 npm ERR! path /usr/src/app/node_modules/bcrypt
#0 6.759 npm ERR! command failed
#0 6.759 npm ERR! command sh -c node-pre-gyp install --fallback-to-build
#0 6.759 npm ERR! sh: 1: node-pre-gyp: Text file busy
#0 6.761
#0 6.761 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-06-10T10_28_41_379Z-debug-0.log```
I encountered the same problem, but for me it happens on GH action on BuildJet ubuntu runners. I can't even fix it by pinning the node version to 18.15 (at which it works locally on my M1 machine).
Edit: I suspect it has to do with the exact version of the ubuntu release as well. When I switch to GitHub native ubuntu runners, the problem is gone. (both ubuntu 22.04)
Exactly the same issue with node:Alpine. node-pre-gyp punch again. M1 Mac.
`#0 6.758 npm ERR! code 126
#0 6.758 npm ERR! path /usr/src/app/node_modules/bcrypt
#0 6.759 npm ERR! command failed
#0 6.759 npm ERR! command sh -c node-pre-gyp install --fallback-to-build
#0 6.759 npm ERR! sh: 1: node-pre-gyp: Text file busy
#0 6.761
#0 6.761 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-06-10T10_28_41_379Z-debug-0.log````
Starting from node 20.4 the problem has been fixed