Closed LaurensRietveld closed 7 months ago
This issue is stale because it has been open for 90 days with no activity.
this is still an issue (and PR still fixes this issue)
This issue is stale because it has been open for 90 days with no activity.
Summary
We've just encountered the issue that importing (not running, but importing) passport-saml throws an error when:
Importing passport-saml will throw this error:
Using an older node version works fine, and importing passport-saml into a CJS module works fine as well.
To Reproduce
See here for an MWE: https://github.com/LaurensRietveld/saml-mwe and follow the readme:
yarn
node ./test.cjs
. This works finenode ./test.js
. This throw the error aboveProbable cause
I expect this be caused by circular reference issue (given that this results in undefined imports). I noticed two circular references:
MultiSamlStrategy.js
depends on onindex.js
, which depends onMultiSamlStrategy.js
MultiSamlStrategy.js
depends onstrategy.js
, which depends onindex.js
which depends onMultiSamlStrategy.js
Environment
passport-saml
version: 4.0.4