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

PrimeNG 15 does not build with RxJS 6 #13012

Closed
cetincakiroglu opened this issue May 10, 2023 · 2 comments
Closed

PrimeNG 15 does not build with RxJS 6 #13012

cetincakiroglu opened this issue May 10, 2023 · 2 comments
Assignees
Labels
Core Team Issue or pull request has been *opened* by a member of Core Team dependencies Issue or pull request is related to a dependency package LTS-FIXED-15.4.3 Fixed in PrimeNG LTS 15.4.3 LTS-PORTABLE PRO Support Issue was reported by PRO User
Milestone

Comments

@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented May 10, 2023

PrimeNG 15's package.json says it works with RxJS "^6.0.0 || ^7.5.0", but when I try to build my project with RxJS 6.6.7, it fails with the following compiler errors because primeng-menubar.mjs is importing RxJS operators in a way that only works with RxJS 7:

./node_modules/primeng/fesm2020/primeng-menubar.mjs:467:46-54 - Error: export 'debounce' (imported as 'debounce') was not found in 'rxjs' (possible exports: ArgumentOutOfRangeError, AsyncSubject, BehaviorSubject, ConnectableObservable, EMPTY, EmptyError, GroupedObservable, NEVER, Notification, NotificationKind, ObjectUnsubscribedError, Observable, ReplaySubject, Scheduler, Subject, Subscriber, Subscription, TimeoutError, UnsubscriptionError, VirtualAction, VirtualTimeScheduler, animationFrame, animationFrameScheduler, asap, asapScheduler, async, asyncScheduler, bindCallback, bindNodeCallback, combineLatest, concat, config, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, identity, iif, interval, isObservable, merge, never, noop, observable, of, onErrorResumeNext, pairs, partition, pipe, queue, queueScheduler, race, range, scheduled, throwError, timer, using, zip)
./node_modules/primeng/fesm2020/primeng-menubar.mjs:467:92-98 - Error: export 'filter' (imported as 'filter') was not found in 'rxjs' (possible exports: ArgumentOutOfRangeError, AsyncSubject, BehaviorSubject, ConnectableObservable, EMPTY, EmptyError, GroupedObservable, NEVER, Notification, NotificationKind, ObjectUnsubscribedError, Observable, ReplaySubject, Scheduler, Subject, Subscriber, Subscription, TimeoutError, UnsubscriptionError, VirtualAction, VirtualTimeScheduler, animationFrame, animationFrameScheduler, asap, asapScheduler, async, asyncScheduler, bindCallback, bindNodeCallback, combineLatest, concat, config, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, identity, iif, interval, isObservable, merge, never, noop, observable, of, onErrorResumeNext, pairs, partition, pipe, queue, queueScheduler, race, range, scheduled, throwError, timer, using, zip)

If I hack on primeng-menubar.mjs and change these imports:

import { Subject, debounce, interval, filter } from 'rxjs';

to this:

import { Subject, interval } from 'rxjs';
import { debounce, filter } from 'rxjs/operators';
it compiles ok.

Either package.json should declare a hard requirement for RxJS 7 or primeng-menubar.mjs should import RxJS operators in a backwards compatible manner.

@cetincakiroglu cetincakiroglu added LTS-PORTABLE dependencies Issue or pull request is related to a dependency package Core Team Issue or pull request has been *opened* by a member of Core Team PRO Support Issue was reported by PRO User labels May 10, 2023
@cetincakiroglu cetincakiroglu self-assigned this May 10, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 10, 2023
@cetincakiroglu cetincakiroglu added LTS-FIXED-15.4.3 Fixed in PrimeNG LTS 15.4.3 and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 10, 2023
@cetincakiroglu cetincakiroglu added this to the 16.0.0 milestone May 11, 2023
cetincakiroglu added a commit that referenced this issue May 11, 2023
@Vittor10
Copy link

Vittor10 commented Aug 1, 2024

Hello @cetincakiroglu ,
I try to change the code in mjs file's, in the way below

import { Subject, interval } from 'rxjs';

import { debounce, filter } from 'rxjs/operators';

But the build gives me always the same error.
Is the only solution updating the version of rxjs to 7.x.x?
What do you mean with hack on primeng-menubar.mjs?

@omarfarukpial
Copy link

I had same problem, and it resolved by using "rxjs": "^7.4.0". If still gives the problem then please delete node module and package-lock and npm install again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Team Issue or pull request has been *opened* by a member of Core Team dependencies Issue or pull request is related to a dependency package LTS-FIXED-15.4.3 Fixed in PrimeNG LTS 15.4.3 LTS-PORTABLE PRO Support Issue was reported by PRO User
Projects
None yet
Development

No branches or pull requests

3 participants