Hi ,
I needed a customized Twitter node, so I copied the original and adapted it for my purposes. I set up the development environment by creating a Docker container, cloning the n8n repository and adding my custom node to the package.json. Everything worked as expected, the node was visible and working correctly.
n8n is running in a separate container along with some other containers, all orchestrated by docker-compose. I used “n8nio/n8n”.
As far as I know, I had to map the path, where my compiled container is, to the path “/root/.n8n/custom/”. This seems to work and the custom node is being picked up. The problem I got is that n8n crashes because it does not find the required dependencies:
"Error: There was an error: Cannot find module ‘n8n-core’".
This error happens in the file “GenericFunctions.js”. I checked and “n8n-core” is installed globally inside the container (just like it should be since I did not alter the Docker container in any way, I just mapped the required volumes).
The compiled javascript looks ok to me:
const n8n_core_1 = require("n8n-core");
const n8n_workflow_1 = require("n8n-workflow");
async function twitterApiRequest(method, resource, body = {}, qs = {}, uri, option = {}) {
Is there anything I missed? Do I have to install the required dependencies locally in my Node?
Any clue would be greatly appreciated