0

I am working on a basic Angular2 sample using NodeJS , and the editor i am using is atom.

I have npm installed angular2(2.0.0-beta.17) and typescript

npm install angular2
npm install -g typescript

In my main.ts am importing

import { Component } from '@angular/core';

For the above line editor is displaying "Can not find module '@angular/core".

What is that I am missing.

refactor
  • 12,044
  • 22
  • 65
  • 100

2 Answers2

3

Angular2 no longer uses the package angular2, but rather a list of different packages under the tag @angular. This list includes, but is not limited to:

  • @angular/common
  • @angular/core
  • @angular/compiler
  • @angular/forms
  • @angular/platform-browser
  • @angular/platform-browser-dynamic

Please refer to the 5 Min Quickstart Guide for further details.

Angular2 used the angular2 package up until the release candidate, when it introduced a breaking change by moving the different modules to their own packages, and all of these under the new @angular tag.

skreborn
  • 1,953
  • 1
  • 13
  • 25
-1

Package name for angular core is @angular/core.

Read quick start guide regarding all the packages needed for angular 2.

Hope this helps!!

Madhu Ranjan
  • 16,498
  • 7
  • 57
  • 66