Cannot find external module 'angular2/angular2' - Angular2 w/ Typescript

前端 未结 10 1461
臣服心动
臣服心动 2020-12-01 21:20

I am going through the step by step tutorial on angular.io (Angular 2). I am using typescript. I get the following error when trying to compile:

Cannot find ex

10条回答
  •  生来不讨喜
    2020-12-01 21:46

    For those who are facing this issue in "Visual Studio TypeScript projects" then you might need to do the following thing to resolve it.

    Open your .csproject in text editor and

    1. change the as CommonJS
    2. Insert additional settings(TypeScriptEmitDecoratorMetadata, TypeScriptExperimentalDecorators) at the end

    Here is my .csproject reference.

    
                false
                true
                ES5
                None
                True
                False
                CommonJS
                
                
                False
                True
                
                True
        True
              
    

提交回复
热议问题