Error on community-node

Hi,

I am trying to build an existing community node (n8n-nodes-document-generator) but I get this error on npm run lint:
1:1 error Definition for rule ‘n8n-nodes-base/node-param-option-name-wrong-for-get-all’ was not found n8n-nodes-base/node-param-option-name-wrong-for-get-all

Could you confirm what this error means and how can I fix it?

Hi @Miquel_Colomer, I am not super familiar with our linting logic unfortunately. Have you installed the latest dependencies? If not, perhaps @ivov can help with this?

Yes. Last versions for n8n.

Now build process is working fine and it generates dist folder with right files.
But lint error always appears when doing
npm run lint

Not sure if I am missing something in the parameters of the node definition.

Yes, that would be useful to clear this error because I am not sure what it’s exactly checking (it seems related with parameter naming on Get All methods, but I have no Get All operation).

That’s the reason why I am going crazy :wink:

Can you please check in n8n-nodes-document-generator/node_modules/eslint-plugin-n8n-nodes-base/package.json that version is the latest 1.9.3? If it is not, please remove n8n-nodes-document-generator/node_modules/eslint-plugin-n8n-nodes-base and package-lock.json and reinstall to ensure you receive the latest version of the linter. Then open Command Pallette and select Restart ESLint server.

For context, we recently switched from Get All to Get Many, and one existing rule had to be renamed to reflect this. Apologies for the inconvenience.

1 Like

Hi @ivov

Thank you for your feedback.

I have checked it and package version is 1.9.3 in eslint-plugin-n8n-nodes-base under node_modules.
And linting throws same error:

1:1 error Definition for rule ‘n8n-nodes-base/node-param-option-name-wrong-for-get-all’ was not found n8n-nodes-base/node-param-option-name-wrong-for-get-all

:heavy_multiplication_x: 1 problem (1 error, 0 warnings)

Not sure if this helps you, but package with linting errors is
n8n-nodes-document-generator

  • Your repo has cleared out the .eslintrc.js config. Compare the new version to the original. Restoring the original config allows the command to succeed. Where possible, please avoid editing this config.
  • Importantly, this edited config is referencing eslint-config-n8n-nodes-base, which is a third-party version of the linter. eslint-plugin-n8n-nodes-base is the officially supported project.
1 Like

Updated .eslintrc.js as well as removed third-party linter following your recommendations.
Pushed new version to npm.

Thanks a lot @ivov!

1 Like