notadd icon indicating copy to clipboard operation
notadd copied to clipboard

errors.interceptor.ts error

Open starit opened this issue 6 years ago • 4 comments

after execute yarn start

./src/notadd/node_modules/ts-node/src/index.ts:240
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
src/common/interceptors/errors.interceptor.ts:7:5 - error TS2416: Property 'intercept' in type 'ErrorsInterceptor' is not assignable to the same property in base type 'NestInterceptor<any, any>'.
  Type '(context: ExecutionContext, calls$: Observable<any>) => Observable<any>' is not assignable to type '(context: ExecutionContext, next: CallHandler<any>) => Observable<any> | Promise<Observable<any>>'.
    Types of parameters 'calls$' and 'next' are incompatible.
      Type 'CallHandler<any>' is missing the following properties from type 'Observable<any>': _isScalar, source, operator, lift, and 6 more.
7     intercept(context: ExecutionContext, calls$: Observable<any>): Observable<any> {
      ~~~~~~~~~

    at createTSError (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:240:12)
    at reportTSError (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:244:19)
    at getOutput (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:360:34)
    at Object.compile (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:393:11)
    at Module.m._compile (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:439:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:442:12)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
error Command failed with exit code 1.

starit avatar Oct 20 '19 07:10 starit

same issue...

chriszhao1988 avatar Jul 13 '20 17:07 chriszhao1988

after execute yarn start

./src/notadd/node_modules/ts-node/src/index.ts:240
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
src/common/interceptors/errors.interceptor.ts:7:5 - error TS2416: Property 'intercept' in type 'ErrorsInterceptor' is not assignable to the same property in base type 'NestInterceptor<any, any>'.
  Type '(context: ExecutionContext, calls$: Observable<any>) => Observable<any>' is not assignable to type '(context: ExecutionContext, next: CallHandler<any>) => Observable<any> | Promise<Observable<any>>'.
    Types of parameters 'calls$' and 'next' are incompatible.
      Type 'CallHandler<any>' is missing the following properties from type 'Observable<any>': _isScalar, source, operator, lift, and 6 more.
7     intercept(context: ExecutionContext, calls$: Observable<any>): Observable<any> {
      ~~~~~~~~~

    at createTSError (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:240:12)
    at reportTSError (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:244:19)
    at getOutput (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:360:34)
    at Object.compile (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:393:11)
    at Module.m._compile (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:439:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/starit/src/notadd/node_modules/ts-node/src/index.ts:442:12)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
error Command failed with exit code 1.

try this instead: calls$.handle().pipe(...)

yrong avatar Aug 31 '20 09:08 yrong

┃依剑✎听雨 QQ 159921208 群费,多给你家里的小孩买点药,就你也配维护社区,不分青红皂白,三观不正,也难怪一个野鸡大学毕业的

AnunnakiPool avatar Sep 08 '20 06:09 AnunnakiPool

same issue...

┃依剑✎听雨 QQ 159921208 群费,多给你家里的小孩买点药,就你也配维护社区,不分青红皂白,三观不正,也难怪一个野鸡大学毕业的

AnunnakiPool avatar Sep 08 '20 06:09 AnunnakiPool