browserify / browserify/wzrd.in
Flagrant System Error when importing enzyme with react-dom
- Dominant language
- JavaScript
- Stars
- 637
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
Hi, thanks for the awesome tools!
I'm trying to get a sketch running at esnextbin, and am getting a bundling error when I try to import enzyme. I understand that this is likely an issue with enzyme, and I'll go an have a look in their issues, too...
The issue is visible in the following gist if you un-comment the `import {shallow} from 'enzyme';` and the last `it()` test then click 'Execute':
- https://esnextb.in/?gist=8032ddde1be3e4d292b1e7cff6a97891
- https://gist.github.com/ptim/8032ddde1be3e4d292b1e7cff6a97891
Fingers crossed, TIA, ptim
The console then produces:
```
---FLAGRANT SYSTEM ERROR---
--- error #0: ---
(logs uuid: 0ee0b440-c1fe-11e6-95c3-57598f133f70 )
Error: "browserify exited with code 1"
code: 1
stderr: Error: Cannot find module 'react-dom' from '/tmp/enzyme1161114-29462-195j7a7/node_modules/enzyme/build'
at /home/admin/browserify-cdn/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:46:17
at process (/home/admin/browserify-cdn/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:173:43)
at ondir (/home/admin/browserify-cdn/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:188:17)
at load (/home/admin/browserify-cdn/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
at onex (/home/admin/browserify-cdn/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
at /home/admin/browserify-cdn/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:82:15)
dirPath: /tmp/enzyme1161114-29462-195j7a7
------
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/jfhbrook/browserify-cdn/issues
Include the ENTIRETY of the contents of this message, and the maintainer(s)
can try to help you out.
Have a nice day!
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure from the linked esnextbin sketch or GitHub gist with the enzyme import and final test enabled. Start by tracing the reported browserify module-resolution error for react-dom from enzyme/build; done means the example bundles and executes without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100