When trying to use tsc
with my ionic2 project, i am getting the following error on a typescript file.
The Error:
TS2307: Cannot find module 'ionic/ionic'
The Code:
import {Page} from "ionic/ionic" //error happens on this line
@Page({
templateUrl: 'app/list/list.html',
})
export class ListPage {
constructor() {}
}
My tsconfig.json file:
{
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"sourceMap": true,
"isolatedModules": true,
"noEmitOnError": false,
"rootDir": ".",
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"compileOnSave": false
}
My npm -g list:
[email protected]
[email protected]
[email protected]
[email protected]
See issue 84
We still need to create a definition file for ionic 2. So until then, the typescript compiler will yell a lot, but it will still compile the code correctly.
This seems to have been resolved in "ionic-framework": "2.0.0-alpha.38"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With