Skip to content

chore: add pixi env for local dev (Node 22 from conda-forge)#43

Merged
viniciusdc merged 2 commits into
mainfrom
chore/pixi-env-for-local-dev
May 15, 2026
Merged

chore: add pixi env for local dev (Node 22 from conda-forge)#43
viniciusdc merged 2 commits into
mainfrom
chore/pixi-env-for-local-dev

Conversation

@viniciusdc

Copy link
Copy Markdown
Owner

Summary

System Node version no longer matters for local dev. Pixi solves a Node 22.12+ env from conda-forge on first make <target> and routes every npm-flavored command through it.

Fixes the Node.js v20.11.0 is not supported by Astro error when the system has an older Node, without forcing a global Node upgrade or fighting nvm.

  • pixi.toml — workspace + tasks (install, dev, build, preview, check, banner) with depends-on so pixi run dev implies install.
  • Makefile — every target now shells to pixi run <task> instead of calling npm directly.
  • pixi.lock — committed (reproducibility, same as package-lock.json).
  • .gitignore — adds .pixi/.
  • README.md — short pixi setup note pointing at the pixi install docs.

Why pixi and not uv

uv is Python-only and can't manage Node. pixi uses conda-forge under the hood, which has a real nodejs package, so this is the right tool for the job. nvm/fnm would also work but require shell integration and aren't reproducible from a lockfile.

What's unchanged

  • CI workflows continue to use actions/setup-node@v6 directly. This change only affects local development.
  • package.json scripts and npm commands work exactly the same — pixi just provides the Node binary they run under.

Test plan

  • pixi run check works on a clean checkout (verified locally — env solves, Node 22 installs, spell-check passes).
  • pixi run build produces dist/ (covered by the install→build dependency chain).
  • Reviewer confirms make dev works on their machine after installing pixi.

Note for #22

PR #22 had its own pixi setup commits that did essentially the same thing. After this lands, those commits in #22 become redundant and will fall out cleanly on the next rebase.

System Node doesn't matter anymore — pixi solves a Node 22.12+ env
from conda-forge on first `make <target>` and routes all npm work
through it. Fixes "Node.js v20 is not supported by Astro" when the
system has an older Node.

- pixi.toml: workspace + tasks (install, dev, build, preview, check,
  banner) with depends-on so `pixi run dev` implies install.
- Makefile: every target shells to `pixi run <task>`.
- .gitignore: add .pixi/.
- README: short pixi setup note + install link.

CI is unchanged — it still uses actions/setup-node directly. This
only affects local development.
…#45)

Closes #44.

- `make` with no args now defaults to `help`, which is auto-generated
  from `## description` comments next to each target.
- `_check_pixi` phony prereq fails fast with an install pointer when
  pixi isn't on PATH, instead of letting every target die with
  "pixi: command not found".
- New `clean` target: removes dist/, .astro/, .pixi/, node_modules/.
- New `doctor` target: prints resolved pixi/node/npm versions.
- Every target now echoes a short `==>` banner so the output isn't a
  wall of npm log.
- `make post` error message now shows the accepted TYPE values
  (`note|arch`) instead of only naming the flag.
@viniciusdc viniciusdc enabled auto-merge (squash) May 15, 2026 18:22
@viniciusdc viniciusdc merged commit ef00484 into main May 15, 2026
6 checks passed
@viniciusdc viniciusdc deleted the chore/pixi-env-for-local-dev branch May 20, 2026 01:02
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

Successfully merging this pull request may close these issues.

1 participant