很简单:通过 Typings 安装 moment 失败:
Typings install moment --save
与'无法在注册表中找到“时刻”(“npm”)......'在其他帖子中有些人说要使用'--ambient',如下所示:
Typings install --ambient moment --save
虽然这有效,但它损坏了我的 Aurelia 模块 ts 文件。它改变
export * from '~aurelia....'
至
import alias = requires('~aurelia....')
export = alias
它在每个模块文件中都这样做,这使得应用程序失败 b/c 它不再识别 Aurelia 框架模块。所以 --ambient 标志不好,我只需要通过 Typings 安装基本的 moment.d.ts 文件。
任何想法如何让 Typings 安装时刻?