Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Build Failing with NPM Errors #30916

Open
2 of 3 tasks
engineerdawood opened this issue Nov 13, 2024 · 2 comments
Open
2 of 3 tasks

Docker Build Failing with NPM Errors #30916

engineerdawood opened this issue Nov 13, 2024 · 2 comments
Labels
dependencies:npm install:docker Installation - docker container

Comments

@engineerdawood
Copy link

engineerdawood commented Nov 13, 2024

Bug description

Issue: Docker Installation Failing with NPM Error Despite System Upgrade

Environment:

  • Version: 4.0
  • Branch: 4.0 (confirmed up-to-date with origin/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.
Copy link

dosubot bot commented Nov 13, 2024

Hey @engineerdawood! I'm here to help you with any bugs, questions, or contributions you have for this project. Let's work together to solve this issue!

The issue you're encountering with the Docker build failing due to NPM errors might be related to the Node.js version you're using. For Superset 4.0.x, it's important to use Node.js version 18.x, as using an unsupported version like 16 can lead to build issues [1].

To resolve this, update your Dockerfile to use Node.js version 18.x. Here's a snippet you can use:

# Install nodejs for custom build
# https://nodejs.org/en/download/package-manager/
RUN set -eux; \
    curl -sL https://deb.nodesource.com/setup_18.x | bash -; \
    apt-get install -y nodejs; \
    node --version;

Make sure to rebuild your Docker container after making this change. This should help resolve the NPM errors you're experiencing.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added dependencies:npm install:docker Installation - docker container labels Nov 13, 2024
@samarsrivastav
Copy link
Contributor

hey I am getting this error

Gracefully stopping... (press Ctrl+C again to force)
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/app/scripts/check-env.py": stat /app/scripts/check-env.py: no such file or directory: unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies:npm install:docker Installation - docker container
Projects
None yet
Development

No branches or pull requests

2 participants