Skip to content

"Error: cannot find module 'stream'" when using Chrome #477

@dave-hirschman

Description

@dave-hirschman

On my Windows Home desktop, I install jszip 3.1.4 with NPM and open this html file with Google Chrome browser (Version 61.0.3163.100 (Official Build) (64-bit)):

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="node_modules/jszip/dist/jszip.js" ></script>
</head>
<body>
<p>Hello</p>
</body>
</html>

Result: "Error: cannot find module 'stream'"

Problem does not occur with Firefox, MS IE, or MS Edge.

Similar to what @mitchwilson found in Issue #464, when I comment out line #1709 module.exports = require("stream"); it works fine. I'm using jszip on client side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions