0

I'm trying to follow the Angular Modules tutorial here, and I've run into the same trouble this person had here. So I'm trying their solution, but running into trouble getting the compiler-cli (ngc) to work. When I try to install with:

npm install @angular/compiler-cli typescript@next @angular/platform-server @angular/compiler

I get:

modules@0.0.0 ~/Documents/Work/modules
├── @angular/compiler@2.4.1 
├─┬ @angular/compiler-cli@2.4.1 
│ └── UNMET PEER DEPENDENCY typescript@^2.0.2
├── @angular/platform-server@2.4.1 
└── UNMET PEER DEPENDENCY typescript@2.2.0-dev.20161230 invalid

The TypeScript version in my package.json is:

"typescript": "~2.0.3"

Should I just install an older version of TypeScript in my project? And what is the best way to do that. Thanks in advance.

Community
  • 1
  • 1
BBaysinger
  • 6,614
  • 13
  • 63
  • 132
  • Where did you get this `npm install` line? If you look at the [quickstart package.json](https://github.com/angular/quickstart/blob/master/package.json) it uses different version of typescript and a bunch of other `@angular` modules. – Nitzan Tomer Dec 31 '16 at 01:52
  • I included a link in my question to where I got that: http://stackoverflow.com/questions/38932193/angular-2-ahead-of-time-compilation-how-to – BBaysinger Dec 31 '16 at 01:56
  • 2
    I see. For me the problem is solved when installing with `typescript` instead of `typescript@next` – Nitzan Tomer Dec 31 '16 at 02:05
  • Oh wow. That worked! Thanks! – BBaysinger Dec 31 '16 at 02:07
  • @NitzanTomer, BTW, still having related issues: http://stackoverflow.com/questions/41405101/running-the-angular-compiler-cli-ngc-cannot-find-module-angular-core – BBaysinger Dec 31 '16 at 03:17

0 Answers0