lisk-sdk
lisk-sdk copied to clipboard
Errors in build process using latest SDK version
Expected behavior
Project should build without errors. ./bin/run start works fine.
Actual behavior
Build process does not complete due to errors. Log:
> tsc
node_modules/lisk-framework/external_types/pm2-axon/index.d.ts:9:10 - error TS2416: Property 'on' in type 'Socket' is not assignable to the same property in base type 'EventEmitter'.
Type '(name: string, val: any) => void' is not assignable to type '(event: string | symbol, listener: (...args: any[]) => void) => this'.
Type 'void' is not assignable to type 'this'.
'this' could be instantiated with an arbitrary type which could be unrelated to 'void'.
9 public on(name: string, val: any): void;
~~
node_modules/lisk-framework/external_types/pm2-axon/index.d.ts:10:10 - error TS2416: Property 'removeAllListeners' in type 'Socket' is not assignable to the same property in base type 'EventEmitter'.
Type '(name?: string | undefined) => void' is not assignable to type '(event?: string | symbol | undefined) => this'.
Type 'void' is not assignable to type 'this'.
'this' could be instantiated with an arbitrary type which could be unrelated to 'void'.
10 public removeAllListeners(name?: string): void;
~~~~~~~~~~~~~~~~~~
src/commands/start.ts:65:9 - error TS2322: Type '{ 'enable-http-api-plugin': IBooleanFlag<any>; 'http-api-plugin-port': IOptionFlag<number | undefined>; 'http-api-plugin-whitelist': flagParser.IOptionFlag<string | undefined>; ... 19 more ...; 'seed-peers': IFlag<...>; }' is not assignable to type 'StartFlags'.
Type '{ 'enable-http-api-plugin': IBooleanFlag<any>; 'http-api-plugin-port': IOptionFlag<number | undefined>; 'http-api-plugin-whitelist': flagParser.IOptionFlag<string | undefined>; ... 19 more ...; 'seed-peers': IFlag<...>; }' is not assignable to type 'Input<any>'.
Property ''data-path'' is incompatible with index signature.
Type 'IFlag<string | undefined>' is not assignable to type 'IFlag<any>'.
Type 'IOptionFlag<string | undefined>' is not assignable to type 'IFlag<any>'.
Type 'IOptionFlag<string | undefined>' is not assignable to type 'IOptionFlag<any>'.
Type 'IOptionFlag<string | undefined>' is not assignable to type '{ completion?: ICompletion | undefined; }'.
Types of property 'completion' are incompatible.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/command/lib/flags").ICompletion | undefined' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/command/lib/flags").ICompletion | undefined'.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/command/lib/flags").ICompletion' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/command/lib/flags").ICompletion'.
Types of property 'cacheKey' are incompatible.
Type '((ctx: import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/command/lib/flags").ICompletionContext) => Promise<string>) | undefined' is not assignable to type '((ctx: import("/Users/[redacted]/code/topas-core/node_modules/@oclif/command/lib/flags").ICompletionContext) => Promise<string>) | undefined'.
Type '(ctx: import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/command/lib/flags").ICompletionContext) => Promise<string>' is not assignable to type '(ctx: import("/Users/[redacted]/code/topas-core/node_modules/@oclif/command/lib/flags").ICompletionContext) => Promise<string>'.
Types of parameters 'ctx' and 'ctx' are incompatible.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/command/lib/flags").ICompletionContext' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/command/lib/flags").ICompletionContext'.
The types of 'config.plugins' are incompatible between these types.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/plugin").IPlugin[]' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/plugin").IPlugin[]'.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/plugin").IPlugin' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/plugin").IPlugin'.
Types of property 'commands' are incompatible.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/command").Command.Plugin[]' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/command").Command.Plugin[]'.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/command").Command.Plugin' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/command").Command.Plugin'.
The types of 'load().run' are incompatible between these types.
Type '(argv?: string[] | undefined, config?: import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/config").LoadOptions) => PromiseLike<any>' is not assignable to type '(argv?: string[] | undefined, config?: import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/config").LoadOptions) => PromiseLike<any>'.
Types of parameters 'config' and 'config' are incompatible.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/config").LoadOptions' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/config").LoadOptions'.
Type 'Options' is not assignable to type 'LoadOptions'.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/config").Options' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/config").Options'.
Types of property 'parent' are incompatible.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/plugin").Plugin | undefined' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/plugin").Plugin | undefined'.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/plugin").Plugin' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/plugin").Plugin'.
Types of property 'commands' are incompatible.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/command").Command.Plugin[]' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/command").Command.Plugin[]'.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/command").Command.Plugin' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/command").Command.Plugin'.
The types of 'load().run' are incompatible between these types.
Type '(argv?: string[] | undefined, config?: import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/config").LoadOptions) => PromiseLike<any>' is not assignable to type '(argv?: string[] | undefined, config?: import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/config").LoadOptions) => PromiseLike<any>'.
Types of parameters 'config' and 'config' are incompatible.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/config").LoadOptions' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/config").LoadOptions'.
Type 'Options' is not assignable to type 'LoadOptions'.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/config").Options' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/config").Options'.
Types of property 'parent' are incompatible.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/plugin").Plugin | undefined' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/plugin").Plugin | undefined'.
Type 'import("/Users/[redacted]/code/topas-core/node_modules/@oclif/config/lib/plugin").Plugin' is not assignable to type 'import("/Users/[redacted]/code/topas-core/node_modules/lisk-commander/node_modules/@oclif/config/lib/plugin").Plugin'.
Property '_debug' is protected but type 'Plugin' is not a class derived from 'Plugin'.
65 static flags: StartFlags = {
~~~~~
Found 3 errors.
Steps to reproduce
mkdir build-test
lisk init
npm run build
Which version(s) does this affect? (Environment, OS, etc...)
Node v16.15.0 NPM v8.5.5 Lisk Commander v5.10.10 Lisk SDK version v5.1.10
I can confirm this also happens for SDK v5.2.2
This issue should be checked against latest version of SDK (in lisk npm repo), and ensure that this problem is resolved.
Closing, superseded by #7532