使用 npm 安装 angular2-meteor 的问题
Issues installing angular2-meteor with npm
正在尝试使用
开始一个新的 angular2-meteor 项目
npm install angular2-meteor --save
出现一大堆红色错误(如下),我不确定它们是什么意思。我已经完成了
npm install npm -g
和
npm update -g
这是错误:
我认为您遵循了快速入门 here。
angular2-meteor 包还没有暴露给 NPM。
检查 this issue
更新:
现在您可以安装了,请按照以下步骤操作:
全局更新你的meteor(如果你已经更新了,就不用再更新了,然后去here看看有没有新版本)。
meteor update --release 1.3-rc.4
运行 在你的终端中创建一个 angular2-meteor1.3 项目:
meteor create --release 1.3-rc.4 hello
cd hello
npm install https://github.com/Urigo/angular2-meteor --save
npm install https://github.com/Urigo/angular2-meteor-auto-bootstrap --save
meteor remove blaze-html-templates
meteor add angular2-compilers
去掉main.js,main.html,main.css 个客户端文件夹中的文件。
然后在您的客户端文件夹中创建这两个文件:
// app.ts
import 'reflect-metadata';
import { bootstrap } from 'angular2-meteor-auto-bootstrap'
import { Component } from 'angular2/core';
@Component({
selector: 'app',
template: `<p>Hello World!</p>`
})
class App {}
bootstrap(App);
(请确保将 import 'reflect-metadata';
第一行放在其他导入之前,否则将无法正常工作。)
// index.html
<head>
<title>Hello</title>
</head>
<body>
<app></app>
</body>
最后,运行 meteor
在终端里去 http://localhost:3000
检查你的应用。
正在尝试使用
开始一个新的 angular2-meteor 项目npm install angular2-meteor --save
出现一大堆红色错误(如下),我不确定它们是什么意思。我已经完成了
npm install npm -g
和
npm update -g
这是错误:
我认为您遵循了快速入门 here。
angular2-meteor 包还没有暴露给 NPM。 检查 this issue
更新:
现在您可以安装了,请按照以下步骤操作:
全局更新你的meteor(如果你已经更新了,就不用再更新了,然后去here看看有没有新版本)。
meteor update --release 1.3-rc.4
运行 在你的终端中创建一个 angular2-meteor1.3 项目:
meteor create --release 1.3-rc.4 hello
cd hello
npm install https://github.com/Urigo/angular2-meteor --save
npm install https://github.com/Urigo/angular2-meteor-auto-bootstrap --save
meteor remove blaze-html-templates
meteor add angular2-compilers
去掉main.js,main.html,main.css 个客户端文件夹中的文件。
然后在您的客户端文件夹中创建这两个文件:
// app.ts
import 'reflect-metadata';
import { bootstrap } from 'angular2-meteor-auto-bootstrap'
import { Component } from 'angular2/core';
@Component({
selector: 'app',
template: `<p>Hello World!</p>`
})
class App {}
bootstrap(App);
(请确保将 import 'reflect-metadata';
第一行放在其他导入之前,否则将无法正常工作。)
// index.html
<head>
<title>Hello</title>
</head>
<body>
<app></app>
</body>
最后,运行 meteor
在终端里去 http://localhost:3000
检查你的应用。