n8n-io / n8n-nodes-starter Goto Github PK
View Code? Open in Web Editor NEWExample starter module for custom n8n nodes.
License: MIT License
Example starter module for custom n8n nodes.
License: MIT License
Hi there!
I was wondering if it made sense to enable the "Template repository" setting on this repository.
Template repositories let users generate new repositories with the same directory structure and files. Learn more.
I've enabled this to try it out on my fork https://github.com/drudge/n8n-nodes-starter if you'd like to see how it works.
https://www.loom.com/share/1763ab6f100844e6a8c7161ba58e1a50
already run the commands prior to that.
I think it could use an update.
A lot has already been done in n8n and many libraries that are used here are no longer needed.
hi,
i am trying to install the sample Nasa starter project from here :
https://docs.n8n.io/integrations/creating-nodes/build/declarative-style-node/
at step 6 while trying npm run build
in my node dir, i get this error:
fs.js:42
} = primordials;
^
ReferenceError: primordials is not defined
i tried to force the dependency by adding the following to my package.json
:
"pnpm":{
"overrides": {
"graceful-fs": "^4.2.11"
}
}
but apparently it can not be applied when there glup server is forced to 3.9.1 in the very same package.json of this repository:
gulp": "^3.9.1",
any ideas how to solve this?
Thanks.
I updated nodejs to version 18.18.2 and the packages to the latest version. When I run n8n at first it starts normally, but after I run the npm link n8n-nodes-oraclesql command, it starts giving these errors, I don't understand why the @AWS-SDK folder gives an error in the node_modules folder .n8n\ custom but there is no error in the n8n folder, if I delete the node_modules folder which is inside the custom folder the n8n starts normally.
C:\Users\gefeson.oliveira\.n8n\custom>n8n start
Initializing n8n process
📌 InstantClient initialized successfully. ✅
Error loading node "runtime-blob-types" from: "C:/Users/gefeson.oliveira/.n8n/custom/node_modules/@aws-sdk/types/dist-es/blob/runtime-blob-types.node.js" - Unexpected token 'export'
C:\Users\gefeson.oliveira\.n8n\custom\node_modules\@aws-sdk\types\dist-es\blob\runtime-blob-types.node.js:1
export {};
^^^^^^
SyntaxError: Unexpected token 'export'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Function.Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at evalmachine.<anonymous>:1:6
at Script.runInContext (node:vm:135:12)
Error: Exiting due to an error.
SyntaxError: Unexpected token 'export'
I returned all package and nodejs versions to their previous versions but the error still persists.
Here are the versions of my package.json
"devDependencies": {
"@types/express": "^4.17.20",
"@types/jest": "^29.5.6",
"@types/node": "^20.8.7",
"@types/oracledb": "^6.0.2",
"@types/request-promise-native": "~1.0.20",
"@typescript-eslint/parser": "~6.8",
"chokidar": "^3.5.3",
"eslint-plugin-n8n-nodes-base": "^1.16.0",
"gulp": "^4.0.2",
"jest": "^29.7.0",
"n8n-core": "^1.5.0",
"n8n-workflow": "^1.6.0",
"nodelinter": "^0.1.19",
"nodemon": "^3.0.1",
"prettier": "^3.0.3",
"ts-jest": "^29.1.1",
"tslint": "^6.1.3",
"typescript": "~5.2.2"
},
"dependencies": {
"oracledb": "^6.2.0"
}
For the life of me, I've been struggling with this for days. I have tried every method described in the docs, and apparently something is happening but neither the starter or the custom node from npm appear.
I'll attach my dockerfile below. Please, if you need more information, let me know.
Thank you for your help.
FROM n8nio/base:18
USER root
COPY docker-entrypoint.sh /
ENV N8N_VERSION=1.30.1
ENV N8N_RELEASE_TYPE=stable
ENV NODE_ENV=production
RUN npm install -g --omit=dev n8n@${N8N_VERSION} --ignore-scripts && \
npm rebuild --prefix=/usr/local/lib/node_modules/n8n sqlite3
# This is the n8n-nodes-starter, only modified the name in package.json
ADD n8n-nodes-pubsubtrigger n8n-nodes-pubsubtrigger
# Installing in /usr/local/lib/node_modules/n8n does not work. Installing in /root/.n8n/custom does not work. Running n8n as node and installing in /home/node/.n8n/custom does not work either.
RUN cd n8n-nodes-pubsubtrigger && \
npm install --include=dev && \
npm link && \
cd /usr/local/lib/node_modules/n8n && \
npm install [email protected] && \
npm link n8n-nodes-pubsubtrigger && \
# rm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/chat && \
# rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-design-system && \
# rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-editor-ui/node_modules && \
# find /usr/local/lib/node_modules/n8n -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" | xargs rm -f && \
# rm -rf /root/.npm && \
mkdir -p /root/.n8n/custom && \
cd /root/.n8n/custom && \
npm install [email protected] && \
npm link n8n-nodes-pubsubtrigger
RUN chmod +x /docker-entrypoint.sh
ENV SHELL /bin/sh
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
EXPOSE 5678/tcp
Not sure, why I can not open a PR here.
Anyway, I stubled across a small bug that occurs when the nodes dir contains only one file and the credentials is empty. This is the case for alternative custom nodes using the same creds as the "normal" version.
"rootDir": "./",
is needed to preserve the directory structure when building.
Related: microsoft/TypeScript#5134 (comment)
I also recommend adding a "release": "npm run build && npm publish"
script
When I want to run n8n , I am taking error like below.
I realize that i think there is a missing folder called "dist".
How can i solve this issue?
Is that my problem or yours?
» Error: There was an error: Cannot find module 'C:/Users/xxx/AppData/Roaming/npm/node_modules/n8n/node_modules/n8n-nodes-deneme/dis odules/n8n-nodes-deneme/dis
» t/credentials/ExampleCredentialsApi.credentials.js'
» Require stack:
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\dist\ClassLoader.js
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\dist\index.js
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\dist\commands\start.js
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\node_modules@oclif\config\lib\plugin.js
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\node_modules@oclif\config\lib\config.js
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\node_modules@oclif\config\lib\index.js
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\node_modules@oclif\command\lib\command.js
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\node_modules@oclif\command\lib\index.js
» - C:\Users\xxx\AppData\Roaming\npm\node_modules\n8n\bin\n8n
i followed all the installation steps but the example nodes won't show up.
At workflow.json
files the node will be addressed as n8n-nodes-starter.httpbin
. Should it be here too?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.