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
  • 13,954
  • 24
  • 68
  • 103

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
  • 2,133
  • 2
  • 16
  • 27
-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
  • 17,334
  • 7
  • 60
  • 69