avatar

sunday

Sunday's Blog

  • 首页
Home nextjs的一些报错及解决方法
文章

nextjs的一些报错及解决方法

Posted 2024-09-10 Updated 2024-09- 11
By sunday
1~2 min read

1.build打包时出现如下错误

  Generating static pages (2/10)  [=   ]TypeError: fetch failed
    at node:internal/deps/undici/undici:13178:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0) {
  [cause]: AggregateError [ECONNREFUSED]: 
      at internalConnectMultiple (node:net:1118:18)
      at afterConnectMultiple (node:net:1685:7)
      at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
    code: 'ECONNREFUSED',
    [errors]: [ [Error], [Error] ]
  }
}

在相应的页面加上

export const dynamic = "force-dynamic";

比如你的首页为一个动态的List表

nextjs, 疑难杂症
nextjs 疑难杂症
License:  CC BY 4.0
Share

Further Reading

Jul 1, 2025

nextjs使用three.js写一个3D模型的查看器Viewer

直接上代码 // components/GLBViewer.js "use client"; import { useEffect, useRef, useState } from "react"; import * as THREE from "three"; import { OrbitCon

May 3, 2025

nextjs15使用better-sqlite3的连接报错问题

1.出现如下错误 ⨯ Error: Could not locate the bindings file. Tried: 解决方法 我是使用pnpm包管理器,执行以下操作 首先安装node-gyp pnpm i node-gyp -D 然后执行 pnpm approve-builds 执行后会

Apr 6, 2025

nextjs + clerk + supabase + realtime 实时监听数据库更改

1.开启realtime.messages策略 在supabase的SQL Editor执行以下命令 create policy "Enable all access for authenticated users" on "public"."messages" as PERMISSIVE for

OLDER

简单自定义修改WordPress WooCommerce的产品页面

NEWER

pm2以clude模式启动nextjs应用

Recently Updated

  • nextjs使用three.js写一个3D模型的查看器Viewer
  • nextjs15使用better-sqlite3的连接报错问题
  • nextjs + clerk + supabase + realtime 实时监听数据库更改
  • 解决nextjs15使用useLocalStorage报错的问题
  • mac上使用nodejs appium控制chrome浏览器

Trending Tags

nginx acme 强制跳转HTTPS nodejs 代理 mac 神器 vue3 工具 docker

Contents

©2025 sunday. Some rights reserved.

Using the Halo theme Chirpy