Run your node locally
You can test your node as you build it by running it in a local n8n instance.
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>Check your directory
Make sure you run npm link <node-name> in the nodes directory within your n8n installation. This can be:
~/.n8n/custom/~/.n8n/<your-custom-name>: if your n8n installation set a different name usingN8N_CUSTOM_EXTENSIONS.
- Start n8n:
n8n start-
Open n8n in your browser. You should see your nodes when you search for them in the nodes panel.
Node names
Make sure you search using the node name, not the package name. For example, if your npm package name is
n8n-nodes-weather-nodes, and the package contains nodes namedrain,sun,snow, you should search forrain, notweather-nodes.
Troubleshooting
If there's no custom directory in ~/.n8n local installation, you have to create custom directory manually and run npm init:
# In ~/.n8n directory run
mkdir custom
cd custom
npm initLast updated on
