我是从svelte开始的,而不是javascript后端开发者。我看到很少有人使用带有svelte / sapper的Auth0,当我尝试导入npm auth0-lock
程序包时,我遇到了events not defined
错误,但是如果我将html头中的javascript链接起来,则没有错误,该怎么办?正确导入auth0-lock
吗?
在main.js中引发了错误,我只想添加:
import Auth0Lock from "auth0-lock";
// // Initializing our Auth0Lock
let lock = new Auth0Lock(
"xxxxxxxxxxxxx",
"xxxxxxxxxx.auth0.com"
);
login = () => {
lock.show();
};
Uncaught ReferenceError: events is not defined at main.js:8
错误