1

I'm trying to run an Angular 2 app but the build is failing with the error "Cannot find module '@angular/core'". I've tried the following steps:

  • In VS2015 I've set my TypeScript Build > Module System to CommonJS
  • In VS2015 Tools > Options > Text Editor > TypeScript > Project has the following options checked: ** Automatically compile TypeScript files which are not part of a project, ** Use CommonJS code generation for modules that are not part of a project, ** ECMAScript version for files that are not part of a project = ECMAScript6
  • In tsconfig.json I've set "target" to "es6"
  • "npm list" on my website node_modules directory shows that angular1 and angular2 are installed

What do you recommend as next steps to debug?

user6604655
  • 993
  • 2
  • 10
  • 20
  • Refer this article - https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html – Sanket Jul 22 '16 at 16:14
  • make sure 'node_modules' is in the right location (in the project's root, sibling with wwwroot). also must show in the project Dependencies folder. I was moving files around as I was integrating the quickstart guide into a new ASP.NET Core project, and the node_modules folder was misplaced. hope this helps – Carlos R Balebona Jan 18 '17 at 19:38

0 Answers0