browserify / browserify/wzrd.in

/standalone/d3 fails, while /bundle/d3 succeeds

Open
#74 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
637
Forks
79
PR merge metrics
No merged PRs in 30d

Description

Seems like `/standalone` is somehow trying to bundle dependencies without respecting the `browserify` field? d3 appears to ship with a built version of itself for browserify: https://github.com/mbostock/d3/blob/master/package.json

```
$ curl wzrd.in/bundle/d3
require=(function e(t,n,r){function...
```

```
$ url wzrd.in/standalone/d3
---FLAGRANT SYSTEM ERROR---
Error: "browserify exited with code 8"

code: 8
stderr:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
SyntaxError: Line 503: Unexpected token ) while parsing /tmp/d311431-2259-usgog9/node_modules/d3/node_modules/jsdom/lib/jsdom/level2/html.js
at Stream.end (/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/index.js:69:21)
at _end (/home/admin/browserify-cdn/node_modules/browserify/node_modules/through/index.js:65:9)
at Stream.stream.end (/home/admin/browserify-cdn/node_modules/browserify/node_modules/through/index.js:74:5)
at f (/home/admin/browserify-cdn/node_modules/browserify/node_modules/module-deps/index.js:217:19)
at makeTransform (/home/admin/browserify-cdn/node_modules/browserify/node_modules/module-deps/index.js:279:46)
at ap (/home/admin/browserify-cdn/node_modules/browserify/node_modules/module-deps/index.js:202:13)
at applyTransforms (/home/admin/browserify-cdn/node_modules/browserify/node_modules/module-deps/index.js:219:11)
at /home/admin/browserify-cdn/node_modules/browserify/node_modules/module-deps/index.js:171:17
at fs.js:266:14
at Object.oncomplete (fs.js:107:15)

dirPath: /tmp/d311431-2259-usgog9
This is probably an issue with the package, and not browserify-cdn itself.
If you feel differently, feel free to file a bug report at:

https://github.com/jesusabdullah/browserify-cdn/issues

Include the ENTIRETY of the contents of this message, and he can
try to help you out.

Have a nice day!
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare the /bundle/d3 and /standalone/d3 entry points using the curl commands in the report, then inspect d3's package.json and its browserify field. Reproduce the browserify exit code 8 and verify that standalone/d3 respects the packaged browser build without parsing jsdom/lib/jsdom/level2/html.js.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.