dat-archive-web
dat-archive-web copied to clipboard
Can't Bundle.js due to graceful-fs
@RangerMauve When I add require('dat-archive-web')
to my build, when budo
tries to bundle it up but there's an Uncaught TypeError: Cannot read property 'toString' of undefined
in graceful-fs
fs.closeSync),
/\bgraceful-fs\b/.test(fs.closeSync.toString()) || (fs.closeSync = module.exports.closeSync,
I suspect this has more to do with including fs
packages meant for nodejs
instead of the Web?
Dependency trail: dat-archive-web (meant for web) node-dat-archive pauls-dat-api fs-extra graceful-fs (meant for node)
Try using the unpkg script tag instead of trying to bundle it with budo. :D
<script src="//unpkg.com/dat-archive-web/bundle.js"></script>
yeah ran into the same issue...(using webpack)
I wonder if I could use this: https://github.com/browserify/ify-loader
@saimonmoore Do let us know if the ify-loader thing works!
I haven't been using webpack lately so sadly I don't know what people do in situations like this. 😅
Yeah I'll play with it and see...
I think @dpaez got dat-js working with Webpack. He might have some insight on the matter.
Hi @saimonmoore, if you can share your webpack config that would be great. I've used dat-js with create-react-app
so webpack was implicit to the setup.