akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.04k stars 1.51k forks source link

errors after update Angular to 11.0.0 #2593

Open kostetskyroma opened 3 years ago

kostetskyroma commented 3 years ago

Issue type

Issue description

Current behavior: errors after update Angular to 11.0.0

image

Expected behavior: without errors

Steps to reproduce:

StackBlitz: https://stackblitz.com/edit/nebular-angular11

Other information:

npm, node, OS, Browser


Node = v14.15.0, npm = 6.14.8
OS: Windows 10
Browser: Chrome
bboydflo commented 3 years ago

I can confirm to have the same issue

idevthings commented 3 years ago

Happens to me too.

htaebi commented 3 years ago

for constructor of ViewportRuler in angular 11 the document is require :

    constructor(_platform: Platform, ngZone: NgZone, 
    /** @breaking-change 11.0.0 make document required */
    document?: any);

error is for super() method that needs document parameter:

export class NbViewportRulerAdapter extends ViewportRuler {
  constructor(platform: NbPlatform, ngZone: NgZone,
              protected ruler: NbLayoutRulerService,
              protected scroll: NbLayoutScrollService) {
    super(platform, ngZone);
  }

please change this:

super(platform, ngZone, document);
mruknowme commented 3 years ago

2572

bboydflo commented 3 years ago

I am curious if anyone is working on this. what would it take to upgrade to angular 11? is there a plan to update soon? I think in the process this would get fixed. Anyone already working on this?

mruknowme commented 3 years ago

Temporary fix using patch-package https://github.com/akveo/nebular/issues/2572#issuecomment-731615605

abadakhshan commented 3 years ago

This problem has been fixed in this version: (but steel in Beta)

https://www.npmjs.com/package/@nebular/theme/v/7.0.0-beta.1

bboydflo commented 3 years ago

so far works as expected! thanks a lot!