superset: Docker Build Failing with NPM Errors
Bug description
Issue: Docker Installation Failing with NPM Error Despite System Upgrade
Environment:
- Version: 4.0
- Branch:
4.0(confirmed up-to-date withorigin/4.0) - Original System Specs: 2 vCPU, 4GB RAM
- Upgraded System Specs: 4 vCPU, 8GB RAM
Problem Description: I initially attempted to build and run my project using Docker on a system with 2 vCPU and 4GB of RAM. The Docker build failed due to insufficient memory, specifically when docker is running npm commands to build Node dependencies.
To address this, I upgraded my system to 4 vCPU and 8GB of RAM. However, after multiple attempts, I am still encountering the following NPM errors during the build process.
I’ve tried rebuilding the Docker container several times, but the error persists. Can anyone provide guidance on what might be causing this issue or suggest potential solutions?
Git Status: On branch 4.0 Your branch is up to date with ‘origin/4.0’.
Any help would be greatly appreciated!
superset_db | 2024-10-26 12:33:48.102 UTC [67] LOG: checkpoint starting: time superset_db | 2024-10-26 12:33:52.300 UTC [67] LOG: checkpoint complete: wrote 43 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=4.017 s, sync=0.013 s, total=4.199 s; sync files=11, longest=0.010 s, average=0.002 s; distance=252 kB, estimate=252 kB superset_node | npm ERR! code FETCH_ERROR superset_node | npm ERR! errno FETCH_ERROR superset_node | npm ERR! invalid json response body at https://registry.npmjs.org/@storybook%2faddon-outline reason: Invalid response body while trying to fetch https://registry.npmjs.org/@storybook%2faddon-outline: Socket timeout superset_node | superset_node | superset_node | npm ERR! A complete log of this run can be found in: superset_node | npm ERR! /root/.npm/_logs/2024-10-26T12_30_06_825Z-debug-0.log
Screenshots/recordings
No response
Superset version
4.0.2
Python version
3.11
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- I have searched Superset docs and Slack and didn’t find a solution to my problem.
- I have searched the GitHub issue tracker and didn’t find a similar bug report.
- I have checked Superset’s logs for errors and if I found a relevant Python stacktrace, I included it here as text in the “additional context” section.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (9 by maintainers)
Commits related to this issue
- env-check fix for https://github.com/apache/superset/issues/30916 — committed to SAFEHR-data/EMAP-Insights by nels 2 years ago
I fixed this issue this way in Docker compose
changing the command, so its started well on my mac
Actually comment out the whole step like this and retry. Also as @mistercrunch suggested, can you run python scripts/check-eny.py ? In my case it came up with these errors. Traceback (most recent call last):
I was able to run this in pycharm by installing the psutil package in Intelij python interpreter. If you are on mac, make sure you also have xcode command line tools installed before doing any of this.
https://stackoverflow.com/questions/72619143/unable-to-import-psutil-on-m1-mac-with-miniforge-mach-o-file-but-is-an-incomp
Also newer docker desktop broke the sym links. You can use docker desktop to auto repair/clean these broken links.
Or you can manually check all versions listed in the check-env to make sure you have the right stuff installed which is what I ended up doing. But then ended up fixing the check-env issue because it bugged me as my “fix” wasn’t really a fix haha.
We recommend 16GB