angular-cli: (beta.11-webpack) Promise - Corresponding file is not included in tsconfig.json
Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
ubuntu 16.04
- Versions. Please run
ng --version
. If there’s nothing outputted, please run in a Terminal:node --version
and paste the result here:
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack
node: 5.11.1
os: linux x64
- Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.
the app was build with angular-cli@beta-10. I followed upgrade instructions and Promises no longer worked, along with styles.
- The log given by the failure. Normally this include a stack trace and some more information.
No errors client side. Just in webstorm.
- Mention any other details that might be useful.
ran `npm i @types/es6-promise` and tried adding "es6-promise" to "types":["jasmine"] array and that didn't work. Makes my app unusable.
Thanks! We’ll be in touch soon.
UPDATE
Promises still compile and work, but it shows all the errors in webstorm. Not sure if I should just suppress statements with Promise
types and .then()
statements or not.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 24 (2 by maintainers)
I had this problem in quite a few projects with IntelliJ. Here is how to get rid of it:
you’ll have to do this for every project. Good news is, this should use Typescripts own service, meaning this should work for every Typescript version in the future. (Until someone breaks it of course)
After doing the same thing over again a few times I managed to get it to work.
npm i @types/es6-promise
then added es6-promise to types in tsconfig.jsonfor some reason those steps didn’t work the first time, now it does.
@EugenIvanou @Codermar @eshell I guess Webstorm is pretty similar to Idea, I am using 2016.2 version and I have installed TypeScript 2.0.2 as global package, then I configure Idea to use that version and not the bundled one.
I guess all the issues comes from, as pointed out from @filipesilva, the TypeScript version you use. Idea/Webstorm should even mark some issue in the
tsconfig.json
about some unrecognized properties.@filipesilva said that
lib
properties has to providePromises
definition to compiler, indeed from tsconfig schemaI have just generated a project with
angular-cli
, I had your same issue that disappeared once TypeScript 2.0.2 has been configured, if I install@types/es6-promise
I get duplicate identifier error as @eshell.My current platform version:
Under OS X global packages are installed in
/usr/local/lib/node_modules
.Hope it helps 😉
You have to update the version of Typescript used in Webstorm to
2.0.0
. Check Webstorm documentation on how to do this.It worked for me after I’ve checked the “Enable TypeScript Compiler” and “Use tsconfig.json” to the WebStorm/PyCharm 2016.2.3 settings window @blackat added above. My
tsconfig.json
is:Now i get this after
ng build -prod
tsconfig.json
It still compiles and works however. It seems to be complaining about
declare class Promise
anddeclare namespace Promise
is all I can make of it.@ljieyao Have you tried to remove
es6-promise
from"types": [ "jasmine","es6-promise" ]
?