You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Is the lib supported in Angular 6 because I am observing issues?
Steps to reproduce the issue
Create app -> ng new my-app (use cli 6.2.6)
App setup:
package.json:
...
"@angular/common": "6.1.10",
...
"@angular/cli": "6.2.6",
"browserify-zlib": "0.2.0"
...
mycomponent.ts:
// var zlib = require("browserify-zlib");
import * as zlib from "browserify-zlib";
zlib.deflate(text, cb);
Actual behavior (issues):
Module not found: Error: Can't resolve 'stream' in \node_modules\browserify-zlib\lib
After installing the stream package -> Uncaught ReferenceError: global is not defined
After setting (window as any).global = window; in polyfills.ts -> Cannot read property 'prototype' of undefined
Tried setting "allowSyntheticDefaultImports": true in tsconfig.json -> same error as above
Tried setting "paths": { "browserify-zlib": [ "node_modules/browserify-zlib/lib/index.js", "node_modules/browserify-zlib/lib/binding.js"] }, in tsconfig.json -> same error as above
p.s. I use pako for the deflation without any issues, however, the above is still valid for this lib.
The text was updated successfully, but these errors were encountered:
Hello,
Is the lib supported in Angular 6 because I am observing issues?
Steps to reproduce the issue
package.json:
...
"@angular/common": "6.1.10",
...
"@angular/cli": "6.2.6",
"browserify-zlib": "0.2.0"
...
mycomponent.ts:
// var zlib = require("browserify-zlib");
import * as zlib from "browserify-zlib";
zlib.deflate(text, cb);
Actual behavior (issues):
p.s. I use pako for the deflation without any issues, however, the above is still valid for this lib.
The text was updated successfully, but these errors were encountered: