Issues building custom n8n nodes after updating n8n-core/ n8n-workflow

Describe the issue/error/question

Updating custom node package n8n dependencies is causing typing issues in a dependency of n8n-workflow

I bumped two version in my package.json:

  • n8n-workflow from 0.134.0 to 0.135.0
  • n8n-core from 0.152.0 to 0.153.0

What is the error message (if any)?

$ npm run build

> [email protected] build
> tsc && gulp

node_modules/n8n-workflow/dist/Expression.d.ts:1:23 - error TS7016: Could not find a declaration file for module '@n8n_io/riot-tmpl'. '/Users/dorney/src/my-nodes/node_modules/@n8n_io/riot-tmpl/dist/tmpl.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/n8n_io__riot-tmpl` if it exists or add a new declaration (.d.ts) file containing `declare module '@n8n_io/riot-tmpl';`

1 import * as tmpl from '@n8n_io/riot-tmpl';
                        ~~~~~~~~~~~~~~~~~~~


Found 1 error in node_modules/n8n-workflow/dist/Expression.d.ts:1

Following the errors suggestions does not help much.
The custom nodes build with no issue and on the original versions.

I feel like there is something I am neglecting to update. Any guidance appreciated!

Hey @dorney,

Can you check that your tsconfig looks like this: n8n-nodes-starter/tsconfig.json at master · n8n-io/n8n-nodes-starter · GitHub

3 Likes

Yup, mine seems like it is a bit outdated.

The missing piece that was causing the issue I was seeing:

"skipLibCheck": true

Thanks @Jon !

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.