Battery-Intelligence-Lab / galv

An open-source platform for automated storage of battery data with advanced metadata support
https://battery-intelligence-lab.github.io/galv/
Other
33 stars 8 forks source link

docker-compose fails to build frontend after clean install #11

Closed pghege closed 2 years ago

pghege commented 2 years ago

Describe the bug

Building galvanalyser_frontend
[+] Building 5.3s (14/16)
=> ERROR [build 7/7] RUN npm run build 3.9s

[build 7/7] RUN npm run build:

14 0.768

14 0.768 > client@0.1.0 build

14 0.768 > react-scripts build

14 0.768

14 3.085 Creating an optimized production build...

14 3.762 Error: error:0308010C:digital envelope routines::unsupported

To Reproduce after clean install change directories in .env to match personal setup. docker-compose build

Expected behavior Build to succeed

I believe it's similar to https://github.com/webpack/webpack/issues/14532 Adding ENV NODE_OPTIONS=--openssl-legacy-provider to Dockerfile made it work for me locally

martinjrobins commented 2 years ago

thanks for the bug report @pghege. Is this problem specific to nodejs 17? If so I'd prefer to stick to the LTS rather than use the work-around, can you see if the fix in 300ab73 works for you?

pghege commented 2 years ago

Yes, It appears to be an issue with nodejs 17. Tried with LTS and it builds correctly. Good call @martinjrobins