Failed to build project with JSZip library
See original GitHub issueVersions
Angular CLI: 6.0.0
Node: 8.11.1
OS: win32 x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.0
@angular-devkit/build-angular 0.6.0
@angular-devkit/build-optimizer 0.6.0
@angular-devkit/core 0.6.0
@angular-devkit/schematics 0.6.0
@ngtools/webpack 6.0.0
@schematics/angular 0.6.0
@schematics/update 0.6.0
rxjs 6.1.0
typescript 2.7.2
webpack 4.6.0
Repro steps
ng new jszip-test
cd .\jszip-test\
npm i --save jszip
- Add the following code in app.component.ts:
import * as JSZip from 'jszip';
...
constructor() {
const zip = new JSZip();
}
ng build
Observed behavior
ERROR in ./node_modules/jszip/lib/readable-stream-browser.js
Module not found: Error: Can't resolve 'stream' in 'C:\dev\jszip-test\node_modules\jszip\lib'
Desired behavior
Should be able to build a project without errors.
Mention any other details that might be useful (optional)
This works as expected with angular-cli 1.7
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:40 (6 by maintainers)
Top Results From Across the Web
JSZip problem updating to wijmo 5.20191... in Angular project
Failed to build project with JSZip library ... Module not found: Error: Can't resolve 'jszip' in It seems that the JSZip module is...
Read more >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 >A project's compilation fails with the "Can't resolve 'stream ...
I've tried creating a clean Angular 6 project and just adding DevExtreme, but the results are the same.
Read more >JSZip
JSZip is a javascript library for creating, reading and editing .zip files, with a lovely and simple API. Current version : v3.10.1.
Read more >How to use the jszip.support function in jszip - Snyk
textLayerMD5) { const textLayerFile = zip.file(textLayerFileName); if (!textLayerFile) { log.error(`Could not find text layer file associated with the ${costume ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
npm i stream
- worked for meIt was hot fix. Right fix: tsconfig.json