question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing jszip in browserify bundle

See original GitHub issue

The require call for jszip uses a concatenated string require('js'+'zip') which stops browserify from including it. The results in a runtime error Cannot find module 'jszip'.

This seems to be intentional (#76?), but I don’t understand why because it just breaks the bundle. Is there a reason why jszip cannot be included and if so how can we build a browser bundle?

Thanks.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:22 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chriddypcommented, Dec 28, 2015

I’ve forked a version that fixes this issue: https://github.com/chriddyp/js-xlsx

$ npm install xlsx-browserify-shim
0reactions
SheetJSDevcommented, Mar 5, 2017

We un-broke all of the require statements in 0.8.7 and included samples with browserify/requirejs/webpack. Please check against the latest version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Error: Can't resolve 'stream' in 'C:\dev\jszip ...
After reading this post I found out that the stream package was missing from my project. You can install it by running the...
Read more >
can't resolve 'stream' in cipher-base - You.com | The AI Search ...
WebCrypto is missing. After getting some JS version of Stream, you may need to use rn-nodeify, a package that helps React Native emulate...
Read more >
@eyeseetea/xlsx-populate - npm
An XLSX workbook is essentially a zip of a bunch of XML files. xlsx-populate uses JSZip to unzip the workbook and sax-js to...
Read more >
Popular "keywords:"ie"" JavaScript packages | Skypack
Transforms browserify bundles into a collection of single files ... A collection of cross-browser utilities to go along with JSZip.
Read more >
Source: util/jszip.js - NASA WorldWind
JSZip - A Javascript class for generating and reading zip files ... Browserify will provide a Buffer implementation for browsers, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found