superset
superset copied to clipboard
Installing error
Bug description
The npm warnings indicate deprecated dependencies and suggest upgrading to newer versions. Specifically, [email protected] is flagged as no longer maintained and not recommended due to potential performance issues. Additionally, there's a notice about updating npm itself to version 10.7.0.
How to reproduce the bug
How to Reproduce the Bug:
Navigate to the specific location or perform the specified action.
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
/bin/sh -c npm run ${BUILD_CMD}" did not complete successfully: exit code: 1
Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] 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.
To address the installation errors and deprecated dependency warnings you're encountering with Superset, let's tackle the issues step by step.
-
Updating
core-js
: The warning about[email protected]
being deprecated suggests that an update is needed. Runnpm update core-js
to updatecore-js
to the latest version. If the warning persists, usenpm ls core-js
to identify which package depends on[email protected]
and update that package accordingly. -
Upgrading npm: To resolve the suggestion to upgrade npm to version
10.7.0
, executenpm install -g [email protected]
. Verify the update by checking your npm version withnpm --version
. -
Troubleshooting the build command: If you're facing issues with the command
/bin/sh -c npm run ${BUILD_CMD}
, please share the exact error message you're encountering. This will help in diagnosing the problem more accurately. -
Superset version issues: The master/latest-dev version of Superset might have known issues. It's important to check the changelog for any recent fixes or changes that might affect your installation.
-
Configuration and environment variables: Ensure that all necessary configurations and environment variables are correctly set up for the build process. This includes checking Docker Compose Services, Environment Variables, Volumes, Network Settings, Dependencies, Customization and Extension, and Production Considerations.
By following these steps, you should be able to address the installation errors and deprecated dependency warnings. If you encounter further issues, providing more detailed error messages will be crucial for further assistance.
Details
Sources
- superset-frontend can not run
- superset 2.1.0 frontend start to use the "npm run dev-server", will appear many warnings
- RpcIpcMessagePortClosedError
- superset 2.1.0 frontend start to use the "npm run dev-server", will appear many warnings
- docker build failed
- superset-frontend/package.json
- superset-frontend/cypress_build.sh
- CHANGELOG/2.0.0.md
- docker/.env
- docs/docs/installation/docker-builds.mdx
- docs/docs/configuration/configuring-superset.mdx
- docker-compose.yml
- docs/docs/contributing/development.mdx
- UPDATING.md
About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
Upgrading npm and node will likely be part of Superset 5.0. We just upgraded it, so we're letting that soak before we do it again.
I think core-js is a subdependency of other modules... hopefully it'll fade over time. Feel free to open some dependency bumps and/or help some dependabot PRs to become mergable, that'll all help move this effort forward.
@dosu ,
- Updating core-js : My core js is upto date
C:\Harsh\Projects\New folder\superset>npm update core-js up to date in 1s
-
Npm version is same as mentioned 10.7.0
-
Exact Error : C:\Harsh\Projects\New folder\superset>docker compose up [+] Building 0.0s (0/0) docker:default 2024/05/08 12:31:57 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed 2024/05/08 12:31:57 http2: server: error reading preface from client //./pipe/docker_engine: file has already been close[+] Building 0.0s (0/0) docker:default [+] Building 214.1s (30/122) docker:default) => [superset-worker-beat internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 5.68kB 0.0s => [superset internal] load metadata for docker.io/library/node:18-bullseye-slim 2.2s => [superset internal] load metadata for docker.io/library/python:3.10-slim-bookworm 3.3s => [superset-init internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 5.68kB 0.0s => [superset internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 5.68kB 0.0s => [superset-worker internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 5.68kB 0.0s => [superset-tests-worker internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 5.68kB 0.0s => [superset-worker-beat auth] library/node:pull token for registry-1.docker.io 0.0s => [superset-worker-beat auth] library/python:pull token for registry-1.docker.io 0.0s => [superset-tests-worker internal] load .dockerignore 0.0s => => transferring context: 1.26kB 0.0s => [superset-worker internal] load .dockerignore 0.1s => => transferring context: 1.26kB 0.0s => [superset-worker-beat internal] load .dockerignore 0.0s => => transferring context: 1.26kB 0.0s => [superset-init internal] load .dockerignore 0.0s => => transferring context: 1.26kB 0.0s => [superset internal] load .dockerignore 0.1s => => transferring context: 1.26kB 0.0s => [superset] importing cache manifest from apache/superset-cache:3.10-slim-bookworm 4.8s => => inferred cache manifest type: application/vnd.oci.image.index.v1+json 0.0s => [superset-tests-worker superset-node 1/7] FROM docker.io/library/node:18-bullseye-slim@sha256:796287ee7814a81420def344e80cb5028f1aae61ac4 0.2s => => resolve docker.io/library/node:18-bullseye-slim@sha256:796287ee7814a81420def344e80cb5028f1aae61ac4c69b67a3b33f360a19fb1 0.0s => [superset-init internal] load build context 18.8s => => transferring context: 90.64MB 18.7s => [superset-tests-worker lean 1/11] FROM docker.io/library/python:3.10-slim-bookworm@sha256:161d1e3deddba156d7834d15e6fe4d010b3b6f69f18ee1 0.2s => => resolve docker.io/library/python:3.10-slim-bookworm@sha256:161d1e3deddba156d7834d15e6fe4d010b3b6f69f18ee1cfba9348e712f4a4ba 0.0s => [superset-worker-beat auth] apache/superset-cache:pull token for registry-1.docker.io 0.0s => [superset-worker-beat internal] load build context 21.1s => => transferring context: 90.64MB 20.9s => [superset-worker internal] load build context 21.7s => => transferring context: 90.64MB 21.4s => [superset internal] load build context 21.0s => => transferring context: 90.64MB 20.7s => [superset-tests-worker internal] load build context 22.1s => => transferring context: 90.64MB 21.8s => CACHED [superset-worker lean 2/11] WORKDIR /app 0.0s => [superset-worker-beat lean 3/11] RUN mkdir -p /app/pythonpath superset/static requirements superset-frontend apache_superset.egg-info 189.1s => => sha256:0b420e7671b84e6ae8f3c7f98cd2be70acd2e9ba9f05465d473310f4b3b14f81 93B / 93B 1.2s => => sha256:20e01760903559d644b0f4ce93e42dd926f23c9910cd73eaabaacc5d3d42fb89 93.32MB / 109.17MB 188.1s => => extracting sha256:0b420e7671b84e6ae8f3c7f98cd2be70acd2e9ba9f05465d473310f4b3b14f81 0.1s => CACHED [superset-tests-worker superset-node 2/7] RUN apt-get update -qq && apt-get install -yqq --no-install-recommends build 0.0s => CACHED [superset-tests-worker superset-node 3/7] WORKDIR /app/superset-frontend 0.0s => [superset-tests-worker superset-node 4/7] RUN --mount=type=bind,target=/frontend-mem-nag.sh,src=./docker/frontend-mem-nag.sh /fronte 66.2s => => sha256:f2830ac65fabec7d4a4ab907c2b1f19aa8fd6d5a7226ce1a4d222800963aae47 125B / 125B 1.2s => => sha256:1827bef05c7264354705e6480caf8ff2f467ec1d7e45135577d030d66080e8a7 115.39MB / 115.39MB 60.8s => => extracting sha256:1827bef05c7264354705e6480caf8ff2f467ec1d7e45135577d030d66080e8a7 4.1s => => extracting sha256:f2830ac65fabec7d4a4ab907c2b1f19aa8fd6d5a7226ce1a4d222800963aae47 0.0s => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 0.0s => ERROR [superset-init superset-node 5/7] RUN --mount=type=bind,target=./package.json,src=./superset-frontend/package.json --mount=ty 123.1s => CANCELED [superset-init lean 4/11] COPY --chown=superset:superset pyproject.toml setup.py MANIFEST.in README.md ./ 0.0s
[superset-init superset-node 5/7] RUN --mount=type=bind,target=./package.json,src=./superset-frontend/package.json --mount=type=bind,target=./package-lock.json,src=./superset-frontend/package-lock.json npm ci: 92.19 npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. 92.78 npm WARN deprecated [email protected]: Use topojson-client, topojson-server or topojson-simplify directly. 109.6 npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. 110.0 npm WARN deprecated [email protected]: This module is now under the @mapbox namespace: install @mapbox/tilebelt instead 116.2 npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) 122.0 npm notice 122.0 npm notice New minor version of npm available! 10.5.0 -> 10.7.0 122.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.7.0 122.0 npm notice Run
npm install -g [email protected]
to update! 122.0 npm notice 122.0 npm ERR! code ECONNRESET 122.0 npm ERR! network Client network socket disconnected before secure TLS connection was established 122.0 npm ERR! network This is a problem related to network connectivity. 122.0 npm ERR! network In most cases you are behind a proxy or have bad network settings. 122.0 npm ERR! network 122.0 npm ERR! network If you are behind a proxy, please make sure that the 122.0 npm ERR! network 'proxy' config is set properly. See: 'npm help config' 122.1 122.1 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-05-08T07_03_30_918Z-debug-0.log
failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1
To address the Docker build and network issues you're encountering with Superset on Windows, here are some tailored steps to help resolve these problems:
-
Switch to WSL2: It's recommended to use WSL2 (Windows Subsystem for Linux) for running Docker on Windows, especially for complex applications like Superset. WSL2 provides a more compatible and efficient environment for Docker operations. You can enable WSL2 through the Windows features settings and install a Linux distribution from the Microsoft Store.
-
Check Docker Desktop Configuration: Make sure Docker Desktop is configured correctly. This includes checking firewall or antivirus settings to ensure Docker can access the network. If you're behind a proxy, configure Docker's proxy settings through Docker Desktop's settings under "Resources" -> "Proxies".
-
Update Deprecated Dependencies: Although your core-js is up to date, ensure all other dependencies are also current. For dependencies that are subdependencies, this might require updating the primary dependencies that require them. Use
docker compose build --pull
to ensure you're using the latest base images, which might include updated dependencies. -
Follow Docker Compose Setup Instructions: Ensure you're following the official Superset documentation for Docker Compose setup. This includes using the correct
docker-compose.yml
file and ensuring all required configurations are correctly set. Allocating sufficient resources to Docker can also help avoid performance issues during the build process. -
Database Connection: If your setup requires connecting to a local database from within Docker containers, use
host.docker.internal
as the hostname instead oflocalhost
. This is applicable for Mac and Windows. For Linux, ensure you're using the correct IP address to connect to your local database. -
Regularly Update Images: Use
docker compose pull
to pull the latest images before starting up. This ensures you have the latest versions of the images and can help avoid issues caused by outdated images.
By following these steps, you should be able to mitigate the build and network issues you're facing with Superset on Docker. If you continue to experience problems, providing detailed error messages and logs can help further diagnose and resolve the issues.
Details
About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
HarshPrajapati2309 facing same issue , were you able to find a way around it ?
If you're encountering similar Docker build and network issues as described, following the steps outlined previously can help resolve these problems. Specifically, switching to WSL2 for Docker on Windows, ensuring Docker Desktop is correctly configured, updating all dependencies, and following the official setup instructions for Docker Compose are crucial steps. Additionally, regularly updating Docker images with docker compose pull
can prevent issues related to outdated images. If these steps do not resolve the issue, providing detailed error messages and logs when asking for further assistance can be very helpful in diagnosing and solving the problem.
Details
About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
HarshPrajapati2309 facing same issue , were you able to find a way around it ?
Install Ubuntu from Microsoft store , Enable developer mode in windows , Enable Windows for Linux and open ubuntu , and run this commands , one by one:
sudo apt update sudo apt install python3-pip pip3 --version pip3 install virtualenv sudo apt-get install python3-venv python3 -m venv supersetdata . supersetdata/bin/activate pip install --upgrade setuptools pip pip install apache-superset export SUPERSET_SECRET_KEY=$(openssl rand -base64 42) superset db upgrade export FLASK_APP=superset superset fab create-admin superset load_examples superset init superset run -p 8088 --with-threads --reload --debugger
Getting this error as well. Seems Docker images are unbuildable using docker compose up
.
failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1
Had to build dev version in local environment by myself.
I am also getting the error while setting up - docker
used command docker compose up
result
91.13 \ Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.test.tsx
91.21 | Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx
91.30 / Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DatasetSelect.tsx
91.35 - Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx
91.43 \ Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx
91.50 | Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.test.tsx
91.59 / Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx
91.65 - Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx
91.88 \ Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/state.ts
91.93 | Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/types.ts
93.16 / Processing: src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.test.ts
------
failed to solve: process "/bin/sh -c npm run ${BUILD_CMD}" did not complete successfully: exit code: 1
I am in macOs - Sonoma 14.1 Apple M3 Pro
did anyone able resolve this
I ran into this recently as well, and @mistercrunch suggest throwing more memory at Docker. That indeed seems to have solved the immediate issue, but doesn't really explain why it recently stopped working with Docker's default memory settings.
We should publish docker recommended settings though it's a bit of a moving target. Also thinning the images could go a long way. That lean image is pretty lean, but that dev one is a bit bloated.
I finally got it to work with giving Docker more memory as well. It used 16.31 GB at its peak for me
Yeah it's brutal - worst step is npm run build
(essentally webpack) in the superset-node
layer. Locally takes much less (under 3GB), wondering what we can do to improve this.
This can help a bit: https://github.com/apache/superset/pull/28784