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

[Bug] Changes between 8.5.1 & 9.0.0 introduce a circular dependency #865

Closed
o-alexandrov opened this issue Dec 23, 2022 · 4 comments
Closed

Comments

@o-alexandrov
Copy link

Description

Changes between 8.5.1 & 9.0.0 introduce a circular dependency

Reproduction

Bundle w/ rollup 8.5.1 (previous version) & then 9.0.0.
You'd see no issues w/ 8.5.1.
And w/ 9.0.0 you'd see the following in your console:

Circular dependency:
../../node_modules/jsonwebtoken/node_modules/semver/classes/comparator.js ->
../../node_modules/jsonwebtoken/node_modules/semver/classes/range.js ->
../../node_modules/jsonwebtoken/node_modules/semver/classes/comparator.js
@rxuxr
Copy link

rxuxr commented Dec 29, 2022

Hi,
I believe I am looking at a similar issue.
After I bumped from 8.5.1 to 9.0.0 in one of our packages bundled by Rollup, there was no error at the build/bundling stage.
However, when importing from this package in our react app, I am seeing the following errors:
TypeError: Cannot destructure property 'ANY' of 'Comparator$1' as it is undefined.

@ricardasjak
Copy link

Same issue using Vite (Rollup under the hood), only with prod build.

@david-renaud-okta
Copy link
Contributor

This is a bug in rollup and/or semver See - npm/node-semver#381

@david-renaud-okta david-renaud-okta closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2023
@kristoffer-hiddengem
Copy link

Taking a (non-dev-)dependency on a buggy package could be considered a bug 😅 Maybe we can check Node support in another way? I'm not entirely sure I understand the 9.0.0 PR, but it seems that on older versions of Node, the checks based on asymmetricKeyDetails is simply skipped, if the semver of process version matches something. How about just skipping the checks if asymmetricKeyDetails is not present?

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

5 participants