【问题标题】:Babeljs finding files that don't existBabeljs 查找不存在的文件
【发布时间】:2015-08-22 17:38:07
【问题描述】:

当我运行“ember serve”时,我收到以下非常令人困惑的消息

[BABEL] Note: The code generator has deoptimised the styling of "ember-blog/bower_components/moment/min/locales.js" as it exceeds the max of "100KB"

它也抛出以下错误:

SyntaxError: ember-blog/bower_components/moment/templates/locale-header.js: Unexpected token (6:0)
  4 |    factory(global.moment)
  5 | }(this, function (moment) { 'use strict';
> 6 | 

我以前安装了 moment 包,但现在它已被删除。使用 ls -la 检查文件系统显示没有名为“moment”的文件夹,那么 Babel 是如何找到文件的?

我尝试删除 'tmp' 目录中的文件,但没有解决问题。

【问题讨论】:

    标签: ember.js babeljs


    【解决方案1】:

    好的,显然它报告该文件位于ember-blog/bower_components/moment/templates/locale-header.js,但该文件实际上位于ember-blog/app/bower_components/moment/templates/locale-header.js

    不知道为什么它会截断应用程序部分,但这就是为什么我找不到导致我悲伤的文件的原因。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-10-08
      • 2016-02-06
      • 2015-06-01
      • 1970-01-01
      • 2011-06-07
      • 2015-12-15
      • 1970-01-01
      相关资源
      最近更新 更多