Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors.interceptor.ts error #523

Open
starit opened this issue Oct 20, 2019 · 4 comments
Open

errors.interceptor.ts error #523

starit opened this issue Oct 20, 2019 · 4 comments

Comments

@starit
Copy link

starit commented Oct 20, 2019

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.

@chriszhao1988
Copy link

chriszhao1988 commented Jul 13, 2020

same issue...

@yrong
Copy link

yrong commented Aug 31, 2020

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(...)

@AnunnakiPool

This comment was marked as spam.

@AnunnakiPool

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants