1

OS: Windows 10 Pro
IDE: Visual Studio 2015 Community

So I've been trying to get the '5 minute quickstart' demo (https://angular.io/guide/quickstart) to work on VS 2015, without success.

I have a package.json file 'included' in my project:

{
  "name": "TypeScriptHTMLApp2",
  "version": "1.0.0",
  "description": "",
  "main": "app.ts",
  "dependencies": {
    "angular2": "2.0.0-alpha.46",
    "systemjs": "0.19.6"
  }
}

and have 'excluded' the 'node_modules' folder, because when included it was generating many duplicate error messages.

But I'm getting error TS2307 'Cannot find module 'angular2/angular2' on the following line:

import {Component, bootstrap} from "angular2/angular2";

How do I resolve this issue so as to make this demo work?

Many thanks in advance

Evan Wieland
  • 1,445
  • 1
  • 20
  • 36
TheoG
  • 1,498
  • 4
  • 30
  • 54
  • 1
    Read this [comment](https://github.com/angular/angular/issues/5248#issuecomment-156043263), it may be helpful (read the entire issue, it's interesting). – Eric Martinez Nov 28 '15 at 01:14
  • 1
    I found the solution to my question, here: http://stackoverflow.com/a/33183829/5613904 – TheoG Nov 28 '15 at 11:29

1 Answers1

0

you have to unload your project file and add the below line

 <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <TypeScriptRemoveComments>false</TypeScriptRemoveComments>
    <TypeScriptSourceMap>true</TypeScriptSourceMap>
    <TypeScriptTarget>ES5</TypeScriptTarget>
    <TypeScriptJSXEmit>None</TypeScriptJSXEmit>
    <TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
    <TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
    <TypeScriptModuleKind>System</TypeScriptModuleKind>
    <TypeScriptModuleResolution>node</TypeScriptModuleResolution> <!-- THIS LINE -->
    <TypeScriptOutFile />
    <TypeScriptOutDir />
    <TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
    <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>
    <TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
    <TypeScriptMapRoot />
    <TypeScriptSourceRoot />
  </PropertyGroup>