Node-Gyp Error Docker React App
Hey y'all, I'm trying to build a react app but I'm not able to install node-gyp for some reason. I saw there's responses about using Nix, but I'd rather use Docker.
I've tried a bunch of different apk scripts but still no luck. I've also tried using different node versions, any ideas?
Dockerfile:
Error
Solution:Jump to solution
I was able to build it using a full image, as the alpine builds are lightweight:
https://github.com/nodejs/docker-node/issues/384
It's a workaround but still curious how I'd do this manually through an alpine image...
GitHub
node:7.9-alpine unable to build package due python is not installed...
Latest solution #384 (comment) Edit 2017: check this solution #384 (comment) Edit 2021: check this solution #384 (comment) Edit 2021: check note on required dependencies: #384 (comment) and #384 (c...
12 Replies
Project ID:
219a95c7-c16f-4dfc-8a87-a950c3537c97
219a95c7-c16f-4dfc-8a87-a950c3537c97
Solution
I was able to build it using a full image, as the alpine builds are lightweight:
https://github.com/nodejs/docker-node/issues/384
It's a workaround but still curious how I'd do this manually through an alpine image
GitHub
node:7.9-alpine unable to build package due python is not installed...
Latest solution #384 (comment) Edit 2017: check this solution #384 (comment) Edit 2021: check this solution #384 (comment) Edit 2021: check note on required dependencies: #384 (comment) and #384 (c...
why does the react app need node-gyp?
Looks like it's coming from a solana wallet adapter, web3 shit.
what is your start script?
NODE_ENV=production node out/index.js
is this some kind of express / frontend jumble?
Yep.
It's building fine with just the regular node:20.17 image instead of alpine.
then that seens like a good solution, we don't charge for build or image storage
So, I just got it deployed and works great now.
Ok got it, thanks.
no problem!