Debowerifying Ember causes error
Opened this issue · 0 comments
saravanak commented
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