Debowerifying Ember causes error
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- build-system, tooling
Research direction
Start with the gulp task and bower_components/ember/ember.js in the linked ember-debowerify reproduction repository. Reproduce the browserify build and inspect how debowerify resolves the ../package.json require from Ember. Done means the demonstrated Ember bundle completes without the reported module-resolution error.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 491
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eugeneware/debowerify
-
Difficulty 2/5 1-3 hours Newbie friendliness 18/100
eugeneware/debowerify#89 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
eugeneware/debowerify#87 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
eugeneware/debowerify#86 · 1 comment · 2 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
eugeneware/debowerify#84 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
eugeneware/debowerify#83 · 2 comments · 1 reaction ·
All issues in eugeneware/debowerify
Similar issues
-
WebsiteOpengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
TanbirRamim/open-source-radar#314 ·
Maintainers usually reply within 1 day
-
prio: medium
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
twentyhq/twenty#28826 · 1 comment ·
Maintainers usually reply within 1 day
-
status: needs triage
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
mastra-ai/mastra#28382 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SolidGeeks/strata#21 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Yomguithereal/mnemonist#247 ·