Unable to comlile typescript file in node js version 10.24.1

Viewed 24

I am getting this log while running the typescript.Nodejs with typescript, integrating it with grpc services call. it is compiling perfectly for grpc, till then there is no error.It showing typeScript is not getting compiled. i have also tried with change expressjs version

file/node_modules/ts-node/src/index.ts:261
[0]     **return new TSError(diagnosticText, diagnosticCodes)**
[0] 
[0] TSError: ⨯ Unable to compile TypeScript:
[0] **src/app.ts(28,14): error TS2339: Property 'listen' does not exist on type** 'Application'.
[0] src/app.ts(42,14): error TS2339: Property 'use' does not exist on type 'Application'.
[0] src/app.ts(43,14): error TS2339: Property 'use' does not exist on type 'Application'.
[0] src/app.ts(44,14): error TS2339: Property 'use' does not exist on type 'Application'.
[0] src/app.ts(45,14): error TS2339: Property 'set' does not exist on type 'Application'.
[0] src/app.ts(46,14): error TS2339: Property 'set' does not exist on type 'Application'.
[0] src/app.ts(51,16): error TS2339: Property 'use' does not exist on type 'Application'.
[0] src/app.ts(53,14): error TS2339: Property 'get' does not exist on type 'Application'.
[0] src/app.ts(59,14): error TS2339: Property 'use' does not exist on type 'Application'.
[0] src/app.ts(63,14): error TS2339: Property 'use' does not exist on type 'Application'.
[0] 
**[0]     at createTSError (/home/user/Projects/node_modules/ts-node/src/index.ts:261:12)
[0]     at getOutput (/home/user/Projects/node_modules/ts-node/src/index.ts:367:40)
[0]     at Object.compile (/home/user/Projects/node_modules/ts-node/src/index.ts:558:11)
[0]     at Module.m._compile (/home/user/Projects/node_modules/ts-node/src/index.ts:439:43)**
[0]     at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
[0]     at Object.require.extensions.(anonymous function) [as .ts] (/home/user/Projects/node_modules/ts-node/src/index.ts:442:12)
[0]     at Module.load (internal/modules/cjs/loader.js:653:32)
[0]     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
[0]     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[0]     at Module.require (internal/modules/cjs/loader.js:692:17)

**npm ERR! code ELIFECYCLE
[0] npm ERR! errno 1
[0] npm ERR! anexchange@0.1.0 local: `NODE_ENV=local ts-node ./src/server.ts`
[0] npm ERR! Exit status 1
[0] npm ERR! 
npm ERR! Failed at the anexchange@0.1.0 local script.
[0] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[0] 
[0] npm ERR! A complete log of this run can be found in:
[0] npm ERR!     /home/user/.npm/_logs/2022-09-15T10_50_39_923Z-debug.log
[0] npm run local exited with code 1
[1] Connecting to  amqp://guest:guest@127.0.0.1
^C^C[1] npm run grpc exited with code SIGINT**
0 Answers
Related