[英]Can not find module '@angular/core' error
I am working on a basic Angular2 sample using NodeJS , and the editor i am using is atom. 我正在使用NodeJS进行基本的Angular2示例,而我使用的编辑器是atom。
I have npm installed angular2(2.0.0-beta.17) and typescript 我已经安装了npm的angular2(2.0.0-beta.17)和打字稿
npm install angular2
npm install -g typescript
In my main.ts am importing 在我的main.ts中正在导入
import { Component } from '@angular/core';
For the above line editor is displaying "Can not find module '@angular/core". 对于上面的行,编辑器显示“找不到模块'@ angular / core”。
What is that I am missing. 我想念的是什么。
Angular2 no longer uses the package angular2
, but rather a list of different packages under the tag @angular
. Angular2不再使用包
angular2
,而是使用标签@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. 有关更多详细信息,请参阅5分钟快速入门指南 。
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.Angular2一直使用
angular2
包,直到发布候选版本为止,当时它通过将不同的模块移动到它们自己的包中并将所有这些都放在新的@angular
标记下进行了重大更改 。
Package name for angular core is @angular/core. 角核的软件包名称为@ angular / core。
Read quick start guide regarding all the packages needed for angular 2. 阅读有关角度2所需的所有包装的快速入门指南 。
Hope this helps!! 希望这可以帮助!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.