Closed kmligue closed 10 months ago
Hey @kmligue
Can you share the commands you ran and your project? A node can fail to appear if there is a code issue or if the npm link commands were not ran in the correct locations.
Hello! I am experiencing the exact same problem. I am following this tutorial (official) Tutorial And I experience the same error output but when runing npm install in the n8n-nodes-webinar (I have a diferent name) However, I can "bypass" the warning runing it with --legacy-peer-deps. Anyways, when doing that, if i then run the link commands (in the webinar dir and in the n8n package folder) I get no error but the nodes won't show up. If I dont run it with the --legacy flag I experience the same error.
I made a post here
Hey @kmligue & @adrianPrestamo,
The path you are running the npm link n8n-nodes-x
command in is not correct. It would be something like ~/.n8n/nodes
which would be one of the 3 paths below depending on the OS.
Windows: C:/Users/username/.n8n/custom MacOS: /Users/username/.n8n/custom Linux: /home/username/.n8n/custom
I will get the documentation updated to make this clearer.
@Joffcom Okey! Thanks. Anyways the problem is the you tube tutorial here I have tried your what you said as @maspio said in the forum post I created. It still doesn't show up or displays this error:
npm WARN node_modules/n8n/node_modules/n8n-nodes-base
npm WARN n8n-nodes-base@"1.9.3" from n8n@1.9.3
npm WARN node_modules/n8n
npm WARN n8n@"^1.9.0" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer n8n-nodes-base@"1.9.2" from n8n-core@1.9.1
npm WARN node_modules/n8n/node_modules/n8n-core
npm WARN n8n-core@"1.9.1" from n8n@1.9.3
npm WARN node_modules/n8n
npm WARN
npm WARN Conflicting peer dependency: n8n-nodes-base@1.9.2
npm WARN node_modules/n8n-nodes-base
npm WARN peer n8n-nodes-base@"1.9.2" from n8n-core@1.9.1
npm WARN node_modules/n8n/node_modules/n8n-core
npm WARN n8n-core@"1.9.1" from n8n@1.9.3
npm WARN node_modules/n8n
This are warnings when installing n8n with npm but they become Errors when linking Edit: (after executing npm init inside n8n/custom)
PS C:\Users\aprestamo\.n8n> cd custom
PS C:\Users\aprestamo\.n8n\custom> npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help init` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (custom)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to C:\Users\aprestamo\.n8n\custom\package.json:
{
"name": "custom",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this OK? (yes)
PS C:\Users\aprestamo\.n8n\custom> npm link n8n-my-nodes-old
added 1 package in 44s
PS C:\Users\aprestamo\.n8n\custom> cd ..
PS C:\Users\aprestamo\.n8n> n8n start
Initializing n8n process
Error loading node "runtime-blob-types" from: "C:/Users/aprestamo/.n8n/custom/node_modules/n8n-my-nodes-old/node_modules/@aws-sdk/types/dist-cjs/blob/runtime-blob-types.node.js" - blob is not defined
evalmachine.<anonymous>:1
new (require('C:/Users/aprestamo/.n8n/custom/node_modules/n8n-my-nodes-old/node_modules/@aws-sdk/types/dist-cjs/blob/runtime-blob-types.node.js').runtime-blob-types)()
^
ReferenceError: blob is not defined
at evalmachine.<anonymous>:1:155
at Script.runInContext (node:vm:135:12)
at loadClassInIsolation (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\ClassLoader.ts:9:16)
at CustomDirectoryLoader.loadNodeFromFile (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\DirectoryLoader.ts:75:35)
at CustomDirectoryLoader.loadAll (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\DirectoryLoader.ts:288:10)
at LoadNodesAndCredentials.runDirectoryLoader (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\LoadNodesAndCredentials.ts:334:3)
at LoadNodesAndCredentials.loadNodesFromCustomDirectories (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\LoadNodesAndCredentials.ts:179:4)
at LoadNodesAndCredentials.init (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\LoadNodesAndCredentials.ts:92:3)
at Start.init (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\commands\BaseCommand.ts:57:3)
at Start.init (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\commands\start.ts:212:3)
Error: Exiting due to an error.
ReferenceError: blob is not defined
Hey @adrianPrestamo,
I am not seeing the errors when running this project but looking at that output are you using the code here as it is or are you trying to make your own node that uses the AWS SDK?
@Joffcom I had the exact same problem on Mac, and your comment about doing link to custom nodes from another location solved it. Thanks a lot !
MacOS: /Users/username/.n8n/custom
Hey @Joffcom,
I am only using the n8n-nodes-starter (this repo) that you have published. I was just trying to get the basic ones to show in the n8n editor.
I have reinstalled n8n, reinstalled the starter package , went to .n8n and created the custom folder. ran npm init and npm install. then after n8n start i get:
the sequence:
npm install n8n -g
(move to repo folder)
npm install
npm link
(move to .n8n folder)
mkdir custom
cd custom
npm init
npm install
n8n start
all the sequence runs without errors except for the n8n start.
PS C:\Users\aprestamo> n8n start
Initializing n8n process
Error loading node "isomorphic" from: "C:/Users/aprestamo/.n8n/custom/node_modules/n8n-my-nodes/node_modules/@jsdevtools/ono/cjs/isomorphic.node.js" - require(...).isomorphic is not a constructor
evalmachine.<anonymous>:1
new (require('C:/Users/aprestamo/.n8n/custom/node_modules/n8n-my-nodes/node_modules/@jsdevtools/ono/cjs/isomorphic.node.js').isomorphic)()
^
TypeError: require(...).isomorphic is not a constructor
at evalmachine.<anonymous>:1:1
at Script.runInContext (node:vm:135:12)
at loadClassInIsolation (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\ClassLoader.ts:9:16)
at CustomDirectoryLoader.loadNodeFromFile (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\DirectoryLoader.ts:75:35)
at CustomDirectoryLoader.loadAll (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\DirectoryLoader.ts:288:10)
at LoadNodesAndCredentials.runDirectoryLoader (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\LoadNodesAndCredentials.ts:248:3)
at LoadNodesAndCredentials.loadNodesFromCustomDirectories (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\LoadNodesAndCredentials.ts:170:4)
at LoadNodesAndCredentials.init (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\LoadNodesAndCredentials.ts:89:3)
at Start.init (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\commands\BaseCommand.ts:53:3)
at Start.init (C:\Users\aprestamo\AppData\Roaming\npm\node_modules\n8n\src\commands\start.ts:213:3)
Error: Exiting due to an error.
TypeError: require(...).isomorphic is not a constructor
Hey @adrianPrestamo,
The steps should be...
npm install n8n -g
(move to repo folder)
npm install
npm link
(move to .n8n folder)
mkdir custom
cd custom
npm init
npm link n8n-nodes-your-node-name
n8n start
Can you try that and see if changes anything, You might need to clear your custom folder as well.
Hello @Joffcom i have tried your steps and it worked. thank you very much!
Perfect I think we can close this then as it is likely that it is the step order, I will make something clearer for it.
https://www.loom.com/share/1763ab6f100844e6a8c7161ba58e1a50 @Joffcom can you please check video above. i already run the commands prior to that.
Hey @adrianPrestamo,
The steps should be...
npm install n8n -g (move to repo folder) npm install npm link (move to .n8n folder) mkdir custom cd custom npm init npm link n8n-nodes-your-node-name n8n start
Can you try that and see if changes anything, You might need to clear your custom folder as well.
Hi, it dowsnt work any more for me on my macos
I cant see the example nodes on the n8n frontend
i followed all the installation steps but the example nodes won't show up.