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

Vuepress hangs during build in isolated environment #3230

Open
MatthiasvB opened this issue Nov 28, 2024 · 0 comments
Open

Vuepress hangs during build in isolated environment #3230

MatthiasvB opened this issue Nov 28, 2024 · 0 comments

Comments

@MatthiasvB
Copy link

  • [x ] I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

What is expected?

With all dependencies installed, vuepress should build even in isolated environments

What is actually happening?

The build hangs indefinetly in the stage "Initializing and preparing data".

Other relevant information

The isolated environment I'm talking about is the nix build environment. You can very easily reproduce this if you have nix installed (and nix-command and flakes enabled via extra-experimental-features), cloned the MWE, enter the project dir and run nix build. In contrast, when you just run nix develop to enter a dev shell and then run npm run docs:build it works fine.

Interestingly, even disabling the sandbox does not help (nix build --no-sandbox). I am not sure, but the most "unusual" thing is that this probably still runs in a chroot.

Nix is a generic package manager focused on reproducibility, which is why all builds happen in an isolated environment where all env vars are unset and access to the network is cut.

You can install Nix on Unix with sh <(curl -L https://nixos.org/nix/install) --daemon source. To enable said experimental features, run sudo bash -c 'echo "extra-experimental-features = nix-command flakes" >> /etc/nix/nix.conf' (at least on Linux).

  • Output of npx vuepress info in my VuePress project:
info 
  System:
    OS: Linux 6.6 NixOS 24.05 (Uakari) 24.05 (Uakari)
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i9-13900H
    Memory: 27.28 GB / 31.03 GB
    Shell: 3.7.1 - /run/current-system/sw/bin/fish
  Binaries:
    Node: 20.17.0 - /nix/store/dcdc33kdjdhjnzg6rkmd0cx4kpwl8cac-nodejs-20.17.0/bin/node
    Yarn: Not Found
    npm: 10.8.2 - /nix/store/dcdc33kdjdhjnzg6rkmd0cx4kpwl8cac-nodejs-20.17.0/bin/npm
    pnpm: Not Found
    bun: Not Found
  Utilities:
    Git: 2.44.1 - /home/matthias/.nix-profile/bin/git
  Browsers:
    Chrome: Not Found
  npmPackages:
    @vuepress/bundler-vite: Not Found
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli: Not Found
    @vuepress/client: Not Found
    @vuepress/core: Not Found
    @vuepress/markdown: Not Found
    @vuepress/shared: Not Found
    @vuepress/utils: Not Found
    vue: ^3.5.10 => 3.5.12 
    vue-router:  4.4.5 
    vuepress: 2.0.0-rc.17 => 2.0.0-rc.17 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant