Closed candu closed 4 years ago
1) openid-client
is not an esm module, as per the package.json's lack of "type": "module"
.
2) you're using esm
package which pre-processes the code somehow to make it into an esm? no clue. An arrow function (=>
) is available in all supported Node.js runtimes in a number of places throughout the code and 3.12.0 did not introduce anything out of the ordinary in the syntax.
Please take this up with the maintainers of esm
. The actions CI is passing on all supported node versions.
Describe the bug When loading latest
openid-client
in anode
process withesm
,Issuer
discovery fails with aSyntaxError
.This was observed in
openid-client
v3.12.0, v3.13.0, v3.14.0; v3.11.0 appears to be unaffected.To Reproduce Issuer and Client configuration: (inline or gist) - Don't forget to redact your secrets.
Steps to reproduce the behaviour:
npm install --save openid-client@latest
(or any version 3.12.0+);npm install esm
;node -r esm
;Expected behaviour
Issuer
discovery works normally, and theissuer
instance is logged successfully.Environment:
Additional context
Stacktrace from
node
REPL: