1. 源码运行
https://github.com/n8n-io/n8n?tab=contributing-ov-file
- Fork the n8n repository.
- Clone your forked repository:
text
git clone https://github.com/<your_github_username>/n8n.git- Go into repository folder:
text
cd n8n- Add the original n8n repository as
upstreamto your forked repository:
text
git remote add upstream https://github.com/n8n-io/n8n.git- Install all dependencies of all modules and link them together:
text
pnpm install- Build all the code:
text
pnpm build1.1.1 Start
To start n8n execute:
text
pnpm start1.1 Development cycle
While iterating on n8n modules code, you can run pnpm dev. It will then automatically build your code, restart the backend and refresh the frontend (editor-ui) on every change you make.
1.1.1 Basic Development Workflow
- Start n8n in development mode:
text
pnpm dev- Hack, hack, hack
- Check if everything still runs in production mode:
text
pnpm build
pnpm start- Create tests
- Run all tests:
text
pnpm test- Commit code and create a pull request
