API、CLI 与扩展
Run your node locally
You can test your node as you build it by running it in a local n8n instance.
- Install n8n using npm:
npm install n8n -g- When you are ready to test your node, publish it locally:
# In your node directory
npm run build
npm link- Install the node into your local n8n instance:
# In the nodes directory within your n8n installation
# node-package-name is the name from the package.json
npm link <node-package-name>- Start n8n:
n8n start- Open n8n in your browser. You should see your nodes when you search for them in the nodes panel.
Troubleshooting
If there's no custom directory in your .n8n local installation, you have to create the custom directory manually and run npm init.
The .n8n directory location depends on your operating system:
- For Windows:
C:\Users\<username>\.n8n\custom - For Linux:
/home/<username>/.n8n/custom - For MacOS:
/Users/<username>/.n8n/custom
Note: The .n8n folder is a hidden folder so it may not appear in your file browser.
# Navigate to your .n8n directory and run:
mkdir custom
cd custom
npm init官方原文和授权
本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。