Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeScript build error TS5023

I am trying to compile TypeScript & NodeJS an getting this error any help?

tsc --version => Version 2.7.2

error TS5023: Unknown compiler option 'lib'.
error TS5023: Unknown compiler option 'strict'.
error TS5023: Unknown compiler option 'esModuleInterop'.
The terminal process terminated with exit code: 1

Updated, added tsconfig.json

{
  "compilerOptions": {
    "target": "ES5",                          
    "module": "commonjs",                    
    "lib": ["es2015"],                            

    "sourceMap": true,                     
    "strict": true,                           
    "esModuleInterop": true, 

    "mapRoot": "./map"                      
  }
}
like image 775
Hattori Hanzō Avatar asked Mar 12 '18 12:03

Hattori Hanzō


2 Answers

I have found my mistake forget to call local version of TypeScript ./node_modules/.bin/tsc --init

like image 105
Hattori Hanzō Avatar answered Nov 15 '22 04:11

Hattori Hanzō


npm install --save-dev [email protected] fixed it at my side.

like image 3
Jeff Tian Avatar answered Nov 15 '22 05:11

Jeff Tian