Welcome to ZecHub, an open-source education hub for Zcash! This Next.js project is designed to provide a platform for educational content related to Zcash and privacy. If you're new to ZecHub or Next.js, this guide will help you get started.
- Node.js
20.19+,22.12+, or24+(Node.js) - Yarn Classic
1.22.22
Node.js 23 is not supported by the current apexcharts dependency. Node.js 22 LTS is recommended.
This project uses Yarn and yarn.lock as its dependency lockfile. Use Yarn commands rather than npm install so the installed packages match the repository.
To set up the development environment, follow these steps:
- Install the project dependencies:
yarn install- Copy the example file:
cp .env.example .env- Run the development server:
yarn devOpen http://localhost:3000 with your browser to see the ZecHub Wiki in action. You can start editing the page by modifying the files within the src/app directory. The page will auto-update as you make changes.
If Yarn reports an error like:
apexcharts@8.3.1: The engine "node" is incompatible with this module
check your Node.js version:
node --versionSwitch to a supported version, then reinstall:
nvm install 22.21.1
nvm use 22.21.1
yarn install --frozen-lockfileAvoid mixing npm and Yarn lockfiles or using yarn install --ignore-engines; the latter bypasses the compatibility check but may leave the app unable to build correctly.
- Do not run
yarn upgrade,yarn upgrade-interactive, orrm yarn.lock && yarn installunless the task is specifically a dependency update. - If you only change application code, leave
yarn.lockuntouched. - If
yarn installwants to update the lockfile, stop and check why before committing it.
Use Yarn Classic v1 and install exactly what is locked:
yarn --version # should be 1.x
yarn install --frozen-lockfileIf this fails locally, fix the environment—Node.js version, Yarn version, or registry—rather than regenerating the lockfile.
git status
git diff --statIf yarn.lock appears and you did not intend a dependency change, restore it before committing:
git checkout origin/main -- yarn.lock
# or
git restore yarn.lockPrefer the project’s default registry. Avoid a personal .yarnrc or .npmrc that forces registry.npmjs.org when the lockfile was generated against registry.yarnpkg.com. When in doubt, check the active registry:
yarn config get registry- Keep one logical change per pull request. A component rewrite should not also refresh the lockfile.
- If a dependency update is required, make it a separate commit or pull request and explain why.
- Run
yarn install --frozen-lockfilebefore pushing and confirm that it succeeds.
Use --ignore-engines only when you are deliberately testing with an unsupported Node.js version. With a supported Node.js version, omit it:
yarn install --frozen-lockfile --ignore-engines # temporary unsupported-Node check only
# or, with a supported Node.js version:
yarn install --frozen-lockfile
git diff --exit-code yarn.lock # should be emptyCheck out nextjs.org to learn more about Next.js.
To deepen your understanding of ZecHub, visit the deployed app at zechub.wiki.
ZecHub wiki is open-source and welcomes your contribution. Read our contributing guide for more details on how.
Translating the wiki? See the translation guide for the translation workflow and how to add a language.
