Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debowerifying Ember causes error #44

Open
saravanak opened this issue Aug 24, 2014 · 0 comments
Open

Debowerifying Ember causes error #44

saravanak opened this issue Aug 24, 2014 · 0 comments

Comments

@saravanak
Copy link

I have installed ember as a bower component: bower install ember

The debowerify transform is applied like so:

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

When I run the above as a gulp task, it shows me the error:

 [07:38:56] Starting 'browserify'... [07:38:56] Running 'bundle'...

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)

On inspecting the ember.js file from the bower_components/ember directory, saw the following code: var packageVersion = require('../package.json').version;

I am not sure how to resolve this issue and make debowerify play nice with Ember. I have created a repo that demonstrates the problem: https://github.com/saravanak/ember-debowerify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant