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

Angular 6 support (run-time error) #74

Open
danail-vasilev opened this issue Dec 2, 2018 · 0 comments
Open

Angular 6 support (run-time error) #74

danail-vasilev opened this issue Dec 2, 2018 · 0 comments

Comments

@danail-vasilev
Copy link

danail-vasilev commented Dec 2, 2018

Hello,
Is the lib supported in Angular 6 because I am observing issues ?
Steps to reproduce the issue:

  1. Use ng cli version 6.2.6 to create a new app -> ng new my-app
  2. Import the lib like that:
    package.json:
    ...
    "@angular/common": "6.1.10",
    ...
    "@angular/cli": "6.2.6",
    "zlibjs": "0.3.1"
    ...
    mycomponent.ts:
    //var zlib = require("zlibjs");
    import * as zlib from "zlibjs";

zlib.deflate(text, cb);

Actual behavior (issues):

  1. zlibjs Cannot find name 'require'.
  2. After using the import clause -> Failed to compress file: ReferenceError: process is not defined
  3. After setting (window as any).process = { env: { DEBUG: undefined }, }; in polyfills.ts -> process.nextTick is not a function

p.s. I use pako for the deflation without any issues, however, the above is still valid for this lib.

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