passport-saml: [BUG] Cannot read property 'Strategy' of undefined
After updating to 1.4.0 (also tried 1.4.1 and 1.4.2) I get the following runtime error:
/workspaces/UWER/dist/backend/index.js:93
_passport.default.use(new _passportSaml.default.Strategy({
^
TypeError: Cannot read property 'Strategy' of undefined
at Object.<anonymous> (/workspaces/UWER/dist/backend/index.js:93:51)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
You can view the code here.
Environment
- Node.js version: 14.13.1
- passport-saml version: 1.4.0, 1.4.1, 1.4.2
I don’t usually develop in JS so my apologies in advance if this is my mistake.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (8 by maintainers)
Commits related to this issue
- Reverting passport-saml to 1.3.5 until their bugs are fixed — committed to uwwebservices/UWER by alex-oswald 4 years ago
- update version of xml2js to 0.4.23, fixes #479 — committed to node-saml/passport-saml by gugu 4 years ago
- update version of xml2js to 0.4.23, fixes #479 — committed to node-saml/passport-saml by gugu 4 years ago
on version 1.5.0 getting: TypeError: parser.parseStringPromise is not a function at SAML.processValidlySignedAssertion (/app/server/node_modules/passport-saml/src/passport-saml/saml.ts:970:12) at /app/server/node_modules/passport-saml/src/passport-saml/saml.ts:708:21 at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5)
@guru Thank you, that seemed to work. If adding
export default
helps not break others that use Babel it may be a good idea.This solved my runtime issue, but I have another issue that is happening on login.