Quick Start (Install & Run)

Get up and running with DocuWriter.ai n8n Nodes in minutes. Ensure you have Node.js ≥ 18.10 and a package manager (npm, yarn, pnpm, or bun). Then clone the repo, install dependencies, and build the project. n8n will consume the compiled dist folder only .

# 1. Clone the repository
git clone https://github.com/DocuWriter-ai/n8n-nodes-docuwriter-ai.git
cd n8n-nodes-docuwriter-ai

# 2. Install dependencies
# (choose your package manager)
pnpm install
{
  "commands": {
    "npm": "npm install",
    "yarn": "yarn install",
    "pnpm": "pnpm install",
    "bun": "bun install"
  }
}
# 3. Build for n8n
pnpm run build
  • After building, you’ll find compiled files in dist/.
  • Copying of SVG icons is handled automatically by the build script .
  • To load these nodes in your local n8n instance, point n8n.config.js (or env var) to the dist/ folder.

Build Steps

The repository defines several npm scripts to streamline development and release. All compiled JavaScript and assets land in dist/, which is the only folder published and consumed by n8n .

Script Command Purpose
⚙️ build tsc && npm run copy:icons Compile TypeScript → JavaScript + copy icons
📁 copy:icons copyfiles "nodes/**/*.svg" dist Copy all .svg assets into dist/
🔄 dev tsc --watch Watch & recompile on file changes
🧹 format prettier nodes credentials --write Format code with Prettier
🐛 lint eslint "nodes/**/*.ts" "credentials/**/*.ts" Lint source files
🔧 lintfix eslint ... --fix Fix lint issues automatically
🚀 prepublishOnly npm run build && npm run lint -s Ensure build & lint pass before publishing
// excerpt from package.json
"scripts": {
  "build": "tsc && npm run copy:icons",
  "copy:icons": "copyfiles \"nodes/**/*.svg\" dist",
  "dev": "tsc --watch",
  "format": "prettier nodes credentials --write",
  "lint": "eslint \"nodes/**/*.ts\" \"credentials/**/*.ts\"",
  "lintfix": "eslint \"nodes/**/*.ts\" \"credentials/**/*.ts\" --fix",
  "prepublishOnly": "npm run build && npm run lint -s"
},
"files": ["dist"]

What Happens During build

  1. TypeScript Compilation

    • Runs tsc according to tsconfig.json.
    • Outputs .js, .d.ts files into dist/ .
  2. Icon Copying

    • Executes copyfiles "nodes/**/*.svg" dist.
    • Ensures custom node icons (e.g., docuwriter.svg) live alongside compiled nodes.

Development Workflow

  • Use pnpm run dev to continuously compile on change.
  • Run pnpm run lint to catch code issues.
  • Auto-format with pnpm run format before committing.

All source lives under nodes/ and credentials/; only the dist/ folder is shipped to n8n.