NEXT JS 使用 Auth0 运行时错误,一秒钟后消失
NEXT JS using Auth0 runtime error that disappears after a second
我在 NEXT JS 中使用 auth0。尝试登录或注销时,我收到此错误大约 0.2 秒,然后我被重定向到我应该重定向到的路径以进行身份验证。
Unhandled Runtime Error
Error: Failed to load script: /_next/static/chunks/pages/api/auth/%5B...auth0%5D.js
.next\static\chunks\main.js (83:51) @ HTMLScriptElement.script.onerror
81 | // executes when `src` is set.
82 | script.onload = resolve;
> 83 | script.onerror = ()=>reject(markAssetError(new Error(`Failed to load script: ${src}`)))
| ^
84 | ;
85 | // 2. Configure the cross-origin attribute before setting `src` in case the
86 | // browser begins to fetch.
所以在搜索了很多之后,并没有找到答案,我预感幸运。问题是使用 next/link 中的 Link 标签。我在网站范围之外传递了 URL。把它换成一个简单的标签对我有用
我在 NEXT JS 中使用 auth0。尝试登录或注销时,我收到此错误大约 0.2 秒,然后我被重定向到我应该重定向到的路径以进行身份验证。
Unhandled Runtime Error
Error: Failed to load script: /_next/static/chunks/pages/api/auth/%5B...auth0%5D.js
.next\static\chunks\main.js (83:51) @ HTMLScriptElement.script.onerror
81 | // executes when `src` is set.
82 | script.onload = resolve;
> 83 | script.onerror = ()=>reject(markAssetError(new Error(`Failed to load script: ${src}`)))
| ^
84 | ;
85 | // 2. Configure the cross-origin attribute before setting `src` in case the
86 | // browser begins to fetch.
所以在搜索了很多之后,并没有找到答案,我预感幸运。问题是使用 next/link 中的 Link 标签。我在网站范围之外传递了 URL。把它换成一个简单的标签对我有用