WebStorm Typescript Compile Error,TS2697:An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.

I have a project with the following directories.


   - lib

     - index.ts

     - a.ts





And I have 2 tsconfig.json, one is under lib, one is under root folder, and I want to compile file under lib with lib/tsconfig.json.

And this is my tsconfig.json under lib

"compilerOptions": {
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"noEmitHelpers": true,
"strictNullChecks": false,
"baseUrl": ".",
"declaration": true,
"outDir": "../release",
"lib": [
"exclude": [
"awesomeTypescriptLoaderOptions": {
"forkChecker": true,
"useWebpackText": true
"compileOnSave": false,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
"files": [


And this is my Typescript compiler settings.

I have tried ‘use tsconfig.json', the result is the same.


I got the following error.



Any help is appreciated, Thank you.



Please try unchecking 'Use TypeScript service' - does the problem persist? The service uses the nearest tsconfig where the current file is included; if no tsconfig.json files that include your file are found, it uses 'default' tsconfig.json. Your tsconfig.json in lib/ folder only includes a single file - index.ts

"files": [

so, other .ts files in this folder don't have any config files associated with them... So, default settings are used by compiler service


Thank you for your quick reply, it solves my problems. I love webstorm !


Please sign in to leave a comment.