mattdesl / mattdesl/esmify

TypeError: Cannot read property 'browserField' of undefined

Open
#18 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
119
Forks
11
PR merge metrics
No merged PRs in 30d

Description

I have the following in my gulpfile.js:

    return browserify(entryPoint, { debug: isDevelopment })
      .transform('esmify')

Which leads to the following error:

TypeError: Cannot read property 'browserField' of undefined
at module.exports (C:\Users\leaha\Desktop\git\design-system\node_modules\esmify\esmify.js:20:24)
at nr (C:\Users\leaha\Desktop\git\design-system\node_modules\module-deps\index.js:315:23)
at onfile (C:\Users\leaha\Desktop\git\design-system\node_modules\resolve\lib\async.js:146:21)
at onex (C:\Users\leaha\Desktop\git\design-system\node_modules\resolve\lib\async.js:201:32)
at C:\Users\leaha\Desktop\git\design-system\node_modules\resolve\lib\async.js:13:20
at FSReqCallback.oncomplete (fs.js:193:5)
at FSReqCallback.callbackTrampoline (internal/async_hooks.js:131:17)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the error from the gulpfile.js browserify configuration, then inspect esmify/esmify.js at the reported line and the surrounding module-deps and resolve calls in the stack trace. A complete fix should prevent the browserField TypeError when the esmify transform runs, with the behavior verified against the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.