-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Ionic V2 + TypeScript cordova is not defined #6836
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
Comments
Try if running the following commands will fix the issue:
Also I think that you should use If the details above don't help, could you post some of the code that causes the problem? On a side note, I would also recommend you to use Node v4/5 since Node v6 is not supported yet. |
well that did work indeed, thank you very much, it should be added to the official documentation. |
Hello all! I would like to add that Ionic Native now supports a wide range of plugins and gives you full typescript support, including intellisense, out of the box without having to install any typings. |
@jgw96, thanks for the tip! Here's a sample snippet for reference. I haven't tested it but it should work: import { InAppBrowser } from 'ionic-native';
// ...
InAppBrowser.open(/* ... */);
// ... |
@iignatov I updated an Ionic beta.6 project to beta.8 and now I'm using typings. Installing new definitions creates the file [TS] [Error] The file "typings/main.d.ts" is not included in the TypeScript compilation context. If this is not intended, please check the "files" or "filesGlob" section of your tsconfig.json file. My
My question is: Do I need to copy the contents of |
@matheo I'm not quite sure because I don't use Atom (but VS Code instead) and I still haven't updated to
I wouldn't do this because this might cause problems with If you didn't manage to find a solution I would recommend you to open an issue in the |
Uh oh!
There was an error while loading. Please reload this page.
Using ionic v2 with typescript, i can't use any cordova module. it throws up "cordova is not defined" both on devices and on the browser, and there is a complete lack of documentation on how do to so correctly, so i'm pretty much stuck.
Steps to reproduce:
3.1 try to run it as some tutorials show it. find you no longer can import "ionic/ionic". find you no longer can import "ionic-framework/ionic". find you now have to import "ionic-angular". keep calm.
IONIC INFO
Cordova CLI: 6.2.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.8
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
OS:
Node Version: v6.2.1
The text was updated successfully, but these errors were encountered: