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:
1
npm install n8n -g
- When you are ready to test your node, publish it locally:
1 2 3
# In your node directory npm run build npm link
-
Install the node into your local n8n instance:
1 2 3
# In the directory where you installed n8n # 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 main directory where you installed n8n. This is probably in thenode_modules
directory within your Node.js installation, if you installed n8n globally. -
Start n8n:
1
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
.