https://github.com/mattkime/get-cursor-position-fail/
Running docker build . from the repo directory results in -
[4/4] Building fresh packages...
error /home/mup/node_modules/get-cursor-position: Command failed.
Exit code: 127
Command: sh
Arguments: -c node-gyp rebuild
Directory: /home/mup/node_modules/get-cursor-position
Output:
sh: 1: node-gyp: not found
Modify Dockerfile to use npm instead and it works fine.
Please mention your node.js, yarn and operating system version.
The official docker images, verified in both v7.6 and v7.7.1. Both use yarn v0.21.3
I have the same bug.
error /build/node_modules/bcrypt: Command failed.
Exit code: 127
Command: sh
Arguments: -c node-gyp rebuild
Directory: /build/node_modules/bcrypt
Output:
sh: 1: node-gyp: not found
With npm install its okey.
Duplicate of #2266. A workaround for now is to run yarn global add node-gyp to your Docker image, before running yarn install.
Even though sometimes this approach won't going to fully work, i've tested the solution over yarn 0.24.6 my solution was to replace bcrypt for bcryptjs same package, same methods and behaviour last one is more js compatible without any dependencies, and it works flawlessly over docker !
Hope this helps people with same issue.
my solution was to replace bcrypt for bcryptjs same package, same methods and behaviour
This is often not desirable as the version using native code can use dedicated threads to calculate the bcrypt hash whereas the JS version cannot.
Most helpful comment
Duplicate of #2266. A workaround for now is to run
yarn global add node-gypto your Docker image, before runningyarn install.