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

Cannot access zstd while npm run dev-server #30422

Open
3 tasks done
darwindennis03 opened this issue Sep 27, 2024 · 11 comments
Open
3 tasks done

Cannot access zstd while npm run dev-server #30422

darwindennis03 opened this issue Sep 27, 2024 · 11 comments

Comments

@darwindennis03
Copy link

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

  • 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 Sep 27, 2024

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
Copy link
Author

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 .

Copy link

dosubot bot commented Sep 28, 2024

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
Copy link
Author

darwindennis03 commented Sep 28, 2024

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

@webobite
Copy link

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

@hainenber
Copy link
Contributor

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

@hainenber
Copy link
Contributor

@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
Copy link
Author

Native windows 32bit . Waiting for that PR thanks .

@webobite
Copy link

webobite commented Oct 5, 2024

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

Thanks, It worked for me.

@darwindennis03
Copy link
Author

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
Copy link
Member

rusackas commented Nov 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants