类型错误:获取失败

问题描述 投票:0回答:1

我将

nuxt 3.8.2
@auth/core 0.20.0
一起使用,并在访问提供商(keycloak)登录页面时在
yarn build && node .output/server/index.mjs
之后遇到此问题...

[auth][error] TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11730:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

这是我的package.json ...

{
  "name": "next-auth-nuxt",
  "private": true,
  "scripts": {
    "dev": "nuxt prepare && nuxt dev",
    "build": "nuxt build",
    "generate": "nuxt generate",
    "preview": "nuxt preview"
  },
  "devDependencies": {
    "@nuxt/eslint-config": "^0.1.1",
    "eslint": "^8.29.0",
    "h3": "1.9.0",
    "nuxt": "3.8.2"
  },
  "dependencies": {
    "@auth/core": "^0.20.0",
    "@hattip/adapter-node": "^0.0.35",
    "@vueform/nuxt": "^1.4.0",
    "@vueform/vueform": "^1.6.5",
    "ag-grid-community": "^31.0.1",
    "ag-grid-vue3": "^31.0.1",
    "moment": "^2.30.1",
    "sweetalert2": "^11.10.2"
  }
}

非常感谢任何帮助。

nuxt.js nuxtjs3 nuxt3 nuxt-auth
1个回答
0
投票

它在开发模式下的本地主机上运行良好。仅发生在构建模式下。

© www.soinside.com 2019 - 2024. All rights reserved.