Node.js and pnpm
Node.js runs the JavaScript tooling and frontends, and pnpm manages their packages; the repositories refuse npm and yarn.
Install
The third command prints the minimum Node.js version. Skip to Configure if pnpm answers and Node.js meets that minimum:
bash
node --version
pnpm --version
curl -fsSL https://raw.githubusercontent.com/a-novel-kit/stack/master/package.json | grep '"node"'The distribution's Node.js is too old; use nvm:
bash
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash
. "$HOME/.nvm/nvm.sh"
nvm install node
npm install --global pnpmAny recent pnpm works: each repository pins its version, and pnpm switches to it.
Configure
The team's packages live on GitHub Packages, which needs a token even to read.
Skip this section if this prints a version:
bash
npm view @a-novel-kit/nodelib-config version --registry=https://npm.pkg.github.com- Create a classic token with only the
read:packagesscope, and copy it. - Save it in your home
.npmrc, never a repository's:
bash
read -rs GITHUB_PACKAGES_TOKEN # paste the token, then press Enter
echo "//npm.pkg.github.com/:_authToken=$GITHUB_PACKAGES_TOKEN" >> ~/.npmrc
chmod 600 ~/.npmrc
unset GITHUB_PACKAGES_TOKENRun the check again to confirm. Platform image builds also need the token in the CLI's secrets.