My node credentials didn't update while create a Custom TriggerNode

Describe the issue/error/question

When I create a custom trigger node, I can’t import it into the workflow.
I followed the tutorial Creating Your First Trigger Node | Docs

What is the error message (if any)?

Screenshot 2021-12-08 at 16.26.34
after investigated, I found the state didn’t change in store

as you can see, the updatedAt is 2 days before.

Please share the workflow

no workflow, just node

Share the output returned by the last node

No, I can’t open Node’s UI, I can’t put it into workflow

Information on your n8n setup

  • n8n version: v14.18.2
  • **Database you’re using (default: SQLite):**default
  • **Running n8n with the execution process [own(default), main]:**own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm

Hi @idisblueflash, welcome to the community :tada:

Unfortunately, I am out of my depth here but have asked internally for help with this one.

@MutedJam Thanks for your help.

Update:
I resolve this issue with a workaround: remove my local repo folder, and start it all over XD

I guess there might be some data in the local DB which causes this issue.

1 Like

Awesome, glad to hear that. Thanks a lot for confirming!

Thank you for your warm welcome~

1 Like

I’m experiencing this issue, as well. I’m following the node creation guide, and it works fine through the first step, but once I add the credentials to the node, it breaks as documented here.

I checked to see if I could create credentials separate from the node, but my custom credential type doesn’t even appear in the list. I can confirm that the .credentials.js file is appearing in the dist directory, and it’s not throwing any errors on build. The correct path is in the package.json file

I tried deleting my ~/.n8n directory and starting over, but this did not help.

So, for some reason, my custom credential type is not getting registered with N8N.

Welcome to the community @Ian_Walls!

Did you add the xxx.credentials.js file to the package.json file?

I did add it, and have confirmed that the path as entered resolves.

I also ran through the three-step process of:

  1. lerna bootstrap --hoist
  2. npm run build
  3. npm run dev

In case starting at 3 was not enough to get things registered in the right places, but that didn’t work either.

I tried copying the code structure from a different credential source (the Trello API instead of the FriendGrid example) and changing the name to be unique, but no go.

I also tried editing the Trello API typescript file to see if it’s changes would be reflected, and they were, so it’s not a blanket problem with credentials, just my custom type… and it doesn’t seem to be the code within that type that’s problematic, either.

Perhaps some kind of caching of the old list of credential types that doesn’t reflect the new entry?

Do you you have your code in a public repo somewhere? It may just be a typo do a second set of eyes may be useful.

Ah ha! I figured out it. I had a naming mismatch:

  • My file was named service.credentials.ts, but
  • My class name was serviceApi

Adding the “Api” after the service in the file name resolved the issue!

@jon Once I get this new service working, I’ll get it published to my public repo, and if the community is interested, I can send a pull request. Thank you!

2 Likes