Excuse my ignorace but I’ve never built anything with node and docs seems to be contradictory.
I am trying do develop and test a node. At present stage I want to upload it to n8n instance and test in prod.
But n8n docs offer two options -
- Submit a community node (definitely not ready yet)
- Create a Docker image with the node installed in n8n (definitely an overkill since I am updating it heavily)
What is the proper workflow to test my node in prod before publishing it to community?
Both of those options look ok to me once you have finished working on your node but during development a common approach would be to use npm link which I think is the approach we document.
There are other things you can try depending on how your current production environment is configured.
I want to test the very part where I publish a node to npm and find it available and working in a prod server.
Would it work if i publish it to npm as any other node and then install it with npm Package name?
I am trying to save hours of tinkering here tbh.
If it is testing the publish and install I would just publish it to npm then in n8n under the settings you can use the community nodes feature to install it.
thanks. that worked for me.
now i am trying to understand how come the same npm package works at local machine and does not work at remote.
Do you get an error when trying to install?
It installs just fine on both instances.
My node has a few resourceLocator fields that fill well on local but fail on remote.
I am sure that credentials at remote are fine because rest api returns a necessary list via http node with the same creds and I can not figure out a way to troubleshoot what is going wrong on remote.
it throws an error
message “fetch is not defined”
It looks like the wrapper I consume uses fetch from node 18. Looks like i will have to make a node 18 n8n docker or switch to REST API.
That would be it, if you are using n8n in a container we use node 16. We tend to avoid too many other packages and if it is just http calls most nodes will manually implement them
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.