【问题标题】:Angular 2 Meteor - TypeScript 'Cannot compile module unless the --module flag is providedAngular 2 Meteor - TypeScript'除非提供--module标志,否则无法编译模块
【发布时间】:2016-02-21 06:04:27
【问题描述】:

我正在关注这个Angular 2.0 Meteor Tutorial。 我完全按照所有步骤添加和删除了指定的模块。安装了 Meteor 和 VS Code 的最新版本。

本教程声称 System.js 可作为模块加载器“开箱即用”,包含在 Angular2-meteor 包中。由于某种原因,它似乎不起作用,因为我在 VS 中遇到错误:

/// <reference path="../typings/angular2-meteor.d.ts" />

import {Component, View, bootstrap} from 'angular2/angular2';

除非提供 '--module' 标志,否则无法编译模块。

我发现关于该主题的其他答案没有任何用处,尤其是因为在我的情况下,必须将 --module 标志提供给由 angular2-meteor 包自动加载的 TS 编译器。

【问题讨论】:

    标签: angular meteor typescript angular2-meteor


    【解决方案1】:

    我通过重新安装整个堆栈(流星、VSCode 和所有软件包)来修复它。不知道到底是什么原因造成的,但似乎是某些软件包版本问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-27
      • 1970-01-01
      • 1970-01-01
      • 2016-05-14
      • 2016-03-03
      • 2019-12-30
      相关资源
      最近更新 更多