apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.8k stars 13.87k forks source link

Cannot access zstd while npm run dev-server #30422

Open darwindennis03 opened 1 month ago

darwindennis03 commented 1 month ago

Bug description

Cannot access the zstd file in windows!!

Answers appreciated!!

Screenshots/recordings

superset@0.0.0-dev dev-server cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development

INFO: Could not find files for the given pattern(s). [webpack-cli] Failed to load 'C:\Users\trias\superset\superset-latest\superset-frontend\webpack.config.js' config [webpack-cli] Error: Can not access zstd! Is it installed?

Superset version

master / latest-dev

Python version

3.11

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

dosubot[bot] commented 1 month ago

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

I found some similar issues and discussions that might help you resolve the problem:

  1. Similar Discussions:

  2. Similar Issues:

To address the specific error you're encountering, ensure that the zstd dependency is correctly installed and configured. The zstd dependency is specified and used in the superset-frontend/webpack.proxy-config.js file:

const { ZSTDDecompress } = require('simple-zstd');

// ...

if (responseEncoding === 'zstd') {
    uncompress = ZSTDDecompress();
}

Steps to Install zstd on Windows:

  1. Install simple-zstd Package: Ensure that the simple-zstd package is installed in your project. You can install it using npm:

    npm install simple-zstd
  2. Verify Installation: After installation, verify that the package is correctly installed by checking your node_modules directory for simple-zstd.

  3. Check Configuration: Ensure that your webpack.proxy-config.js file correctly imports and uses the ZSTDDecompress function from the simple-zstd package.

If you continue to experience issues, please provide additional details about the error messages or any specific configurations you have in place.

To continue talking to Dosu, mention @dosu.

darwindennis03 commented 1 month ago

Problem is simple-std package itself uses zstd in background . When i inspect the simple-std node package it has const find = (process.platform === 'win32') ? 'where zstd.exe' : 'which zstd';

which checks for the zstd .

Any suggestions regarding this .

dosubot[bot] commented 1 month ago

The simple-zstd package relies on the zstd executable being available on your system. Since you're on Windows, you'll need to ensure that zstd.exe is installed and accessible in your system's PATH.

Steps to Install zstd on Windows:

  1. Download zstd Executable:

    • Go to the Zstandard releases page.
    • Download the appropriate zstd executable for Windows (usually found in the zstd-vX.X.X-win64.zip file).
  2. Extract and Place zstd.exe:

    • Extract the contents of the downloaded ZIP file.
    • Place zstd.exe in a directory that is included in your system's PATH. Common directories include C:\Windows\System32 or any other directory that is already in your PATH.
  3. Add Directory to PATH (if needed):

    • If you placed zstd.exe in a custom directory, you need to add this directory to your system's PATH.
    • To do this, follow these steps:
      1. Open the Start Menu and search for "Environment Variables".
      2. Select "Edit the system environment variables".
      3. In the System Properties window, click on the "Environment Variables" button.
      4. In the Environment Variables window, find the "Path" variable in the "System variables" section and select it.
      5. Click "Edit" and then "New" to add the directory where zstd.exe is located.
      6. Click "OK" to close all windows.
  4. Verify Installation:

    • Open a new Command Prompt window and run the following command to verify that zstd is accessible:
      where zstd.exe
    • If the command returns the path to zstd.exe, the installation is successful.

After completing these steps, try running your development server again. This should resolve the issue with accessing zstd on Windows.

To continue talking to Dosu, mention @dosu.

darwindennis03 commented 1 month ago

@dosu Can u provide discussion link for superset build tools installation required for windows .

webobite commented 1 month ago

I am facing same issue for Mac OS as well, any solution for the same ?

hainenber commented 1 month ago

@webobite on Mac, you need to install zstd via Homebrew (brew install zstd)

hainenber commented 1 month ago

@darwindennis03 might I know if you are running dev-server in WSL or native Windows? If it's the latter case, and assuming you're using Ubuntu/Debian-flavoured distro, you can install zstd via apt-get install zstd.

I'll probably make a PR to add these steps as instructions.

darwindennis03 commented 1 month ago

Native windows 32bit . Waiting for that PR thanks .

webobite commented 1 month ago

@webobite on Mac, you need to install zstd via Homebrew (brew install zstd)

Thanks, It worked for me.

darwindennis03 commented 1 month ago

when i inspect simple-zstd package it still checks for the path of the zstd installation. Do i need to have it in my windows build tools or something like that .

rusackas commented 1 week ago

Just adding that we don't officially support Windows... but if you add (or anyone adds) some docs/scripts/support to make Superset work on Windows reliably, maybe we can in the future.