You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, that would complain that it can't resolve auth0-lock/passwordless.
Thinking it might be my setup, I checked out your auth0-react-samples with the same effect - after ensuring that the module auth0-lock has the version 11.2.2 (which should have the passwordless support merged).
Looking at the module itself, there is however a lib folder so I was experimenting with that. You may stop me here as I shouldn't be doing that, but I am including it anyway.
Now it can compile but fails at runtime trying to instantiate Auth0LockPasswordless:
Uncaught TypeError: Super expression must either be null or a function, not undefined
at _inherits (bundle.js:82563)
at bundle.js:82566
at Object.<anonymous> (bundle.js:82578)
at __webpack_require__ (bundle.js:556)
at fn (bundle.js:87)
at Object.<anonymous> (bundle.js:82289)
at __webpack_require__ (bundle.js:556)
at fn (bundle.js:87)
at Object.<anonymous> (bundle.js:81380)
at __webpack_require__ (bundle.js:556)
With the lines 82563 to 82566 being:
function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor: {value: subClass,enumerable: false,writable: true,configurable: true}});if(superClass)Object.setPrototypeOf ? Object.setPrototypeOf(subClass,superClass) : subClass.__proto__=superClass;}varAuth0Lock=function(_Core){_inherits(Auth0Lock,_Core);
This seem to come down to it not finding the base class (here _Core).
Interestingly, importing the index (either just auth0-lock or auth0-lock/lib/index) seem to make the auth0-lock/lib/passwordless import work.
The text was updated successfully, but these errors were encountered:
de-code
changed the title
Unable to import auth0-lock/lib/passwordless or 'TypeError: Super expression must either be null or a function, not undefined'
Unable to import auth0-lock/passwordless or 'TypeError: Super expression must either be null or a function, not undefined'
Feb 8, 2018
Hi @de-code. Thanks for bringing this up. I think we got the export totally wrong for Passwordless. I just opened a PR to fix this and do proper exports for it. In v.12.2.3 (soon to be released), you'll be able to import it like:
import { Auth0LockPasswordless } from 'auth0-lock'
As was confirmed in #1256 - the import should be:
However, that would complain that it can't resolve
auth0-lock/passwordless
.Thinking it might be my setup, I checked out your auth0-react-samples with the same effect - after ensuring that the module
auth0-lock
has the version11.2.2
(which should have the passwordless support merged).Looking at the module itself, there is however a
lib
folder so I was experimenting with that. You may stop me here as I shouldn't be doing that, but I am including it anyway.I went ahead and changed the import:
Now it can compile but fails at runtime trying to instantiate
Auth0LockPasswordless
:With the lines 82563 to 82566 being:
This seem to come down to it not finding the base class (here _Core).
Interestingly, importing the index (either just
auth0-lock
orauth0-lock/lib/index
) seem to make theauth0-lock/lib/passwordless
import work.The text was updated successfully, but these errors were encountered: