Closed sunshineo closed 8 years ago
Sublime is happy if I use
import {Component, View, NgZone} from '../typings/angular2/core';
But meteor compiler will say things are broken.
Solution provided at chapter 7 http://www.angular-meteor.com/tutorials/socially/angular2/folder-structure
Which part of the chapter specifically helped you resolve this issue. My issue is not with my IDE. I receive this message it the terminal when I run my app.
This is my tsconfig.json
"compilerOptions": {
"diagnostics": true,
"noResolve": false,
"experimentalDecorators": true,
"module": "commonjs",
"target": "es5",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"sourceMap": true
},
"meteorCompilerOptions": {
"alwaysThrow": false,
"useCache": true
},
"files": [
"typings/main.d.ts",
"typings/angular2-meteor/angular2-meteor.d.ts"
]
My problem was with IDE only. The section TypeScript Configuration and IDEs helped me.
I am using Meteor 1.3 and apparently I did not need all the typings that I had because the Meteor 1.3 compiler automatically loads them from the node_modules folder. Thanks to the response from @barbatus for helping to point me in the right direction.
Hello,
I'm following tutorial here http://www.angular-meteor.com/tutorials/socially/angular2/bootstrapping After step 0.8, the error on the console went away as the tutorial said it would but my sublime still cannot resolve the types properly.
As you can see, it says:
Module "angular2/core" resolves to a non-module entity and cannot be imported using this construct.
You can also see that I tried to reference the definition file directly using/// <reference path="../typings/angular2-meteor/angular2-meteor.d.ts" />
. It has no effect. My tsconfig.json:Now, I have installed typescript plugin for my sublime. When I was following the angular 2 tutorial at https://angular.io/docs/ts/latest/tutorial/ , everything works fine.
Any idea helps. Thanks in advance.