This document provides instructions for setting up the development environment to contribute to this project.
The setup process involves using both npm and pnpm package managers. Follow these steps carefully to set up your environment correctly:
- Node.js (recommended version: 16.x or later)
- npm (comes with Node.js)
- pnpm (version 10.5.0 or compatible)
We recommend enabling Node.js corepack:
corepack enableWith Node.js v16.17 or newer, you can install the latest version of pnpm:
corepack prepare pnpm@latest --activateIf you use an older version of Node.js, install at least version 9.15 of pnpm:
corepack prepare pnpm@9.15.5 --activateIMPORTANT: If you have installed Node.js via homebrew, you'll need to run:
brew install corepackThis is necessary because homebrew explicitly removes npm and corepack from the node formula.
-
Install n8n globally using npm:
npm install -g n8n
-
Run n8n once to generate the necessary configuration directory:
n8n
This will create a
.n8ndirectory in your home folder. -
Navigate to the n8n configuration directory:
cd ~/.n8n
-
Create a custom directory for your custom nodes:
mkdir custom
-
Navigate to the custom directory and initialize a new pnpm project:
cd custom pnpm init -
Replace the content of the
package.jsonfile with the following (be sure to adjust the path to then8n-nodes-couchbasepackage):{ "name": "custom", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "@langchain/community": "^0.3.38", "n8n-nodes-couchbase": "file:/path/to/n8n-nodes-couchbase" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "packageManager": "pnpm@10.5.0" }Note: You may need to update the path to the
n8n-nodes-couchbasepackage to match your local environment. -
Install the dependencies:
pnpm install
-
Start the development UI:
pnpm run dev:ui
If you encounter any issues during setup:
- Make sure your Node.js version is compatible with n8n
- Verify that both npm and pnpm are correctly installed
- Check that the path to the n8n-nodes-couchbase package in the package.json file is correct for your environment
- For more details on working with custom nodes in n8n, refer to the n8n documentation.
- If you're encountering persistent issues, please open an issue in the repository.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request