去除灰烬会导致错误

时间:2014-08-24 06:11:51

标签: ember.js gulp browserify

我已将ember安装为bower组件: bower install ember

debowerify变换应用如下:

var debowerify = require('debowerify'); browserify(). .transform(debowerify) .require('./bower_components/ember/ember.js') .bundle() .pipe(source('vendor.js')) .pipe(gulp.dest('./build'));

当我将上述内容作为gulp任务运行时,它会显示错误:

```     [07:38:56]开始'浏览器化......     [07:38:56]跑步'捆绑' ...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Cannot find module '../package.json' from 'app_root/bower_components/ember'
    at app_root/node_modules/browserify/node_modules/resolve/lib/async.js:43:25
    at load (app_root/node_modules/browserify/node_modules/resolve/lib/async.js:61:43)
    at app_root/node_modules/browserify/node_modules/resolve/lib/async.js:67:22
    at app_root/node_modules/browserify/node_modules/resolve/lib/async.js:21:47
    at Object.oncomplete (fs.js:107:15)

```

在检查bower_components / ember目录中的ember.js文件时,看到以下代码: var packageVersion = require('../package.json').version;

我不知道如何解决这个问题,让debowerify与Ember合作。我创建了一个展示问题的回购:https://github.com/saravanak/ember-debowerify

0 个答案:

没有答案