Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browserify and iiif-db not working #8

Open
mitra42 opened this issue Jul 15, 2017 · 0 comments
Open

browserify and iiif-db not working #8

mitra42 opened this issue Jul 15, 2017 · 0 comments

Comments

@mitra42
Copy link

mitra42 commented Jul 15, 2017

Has anyone else had problems getting ipfs-iiif-db to work with Browserify ?

If I add the line
const IIIFDB = require('ipfs-iiif-db');

To either browser.js or inside one of my modules, then nothing from that point on gets loaded, even though it appears to be present in the browserified bundle as do the .

Its a weird error, clearly related to this line, though neither browserify, nor firefox complain about it at loading. it just can't find the enclosing module, nor anything after it during execution.

If I comment out this line then it gets loaded fine (but of course fails when it cant find IIIFDB).

I've tried on current Firefox and Chrome, so doesn't appear to be a browser dependency.
The code works ok when running in node itself.

FOr example ... if browser.html looks like:
window.Dweb = require('./Dweb'); //TODO move inner calls in Dweb to save locally
window.sodium = require("libsodium-wrappers"); // Needed for cryptotest
window.ZZ1 = "Hello there";
window.IIFDB = require('ipfs-iiif-db');
window.TransportIPFS = require('./TransportIPFS');
window.ZZ3 = "Goodbye";

Then neither IIFDB, TransportIPFS nor ZZ3 are defined, but ZZ1 is.

I've updated node, npm, browserify and ipfs-iiif-db to current versions.

Any ideas ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant