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

Mar 27, 2025

解决nextjs15使用useLocalStorage报错的问题

已经在组件中使用"use client"声明了,还是报错,错误如下: Unhandled Runtime Error Error: useLocalStorage is a client-only hook 1.解决方案1-使用 dynamic 导入 import dynamic from 'nex

Dec 21, 2024

让debian12笔记本盒盖不休眠

1.打开终端,编辑 /etc/systemd/logind.conf 文件,查找下面的选项并改成下面那样 HandleLidSwitch=ignore HandleLidSwitchExternalPower=ignore LidSwitchIgnoreInhibited=no

Dec 3, 2024

如何查找字体的family名称

有时一些软件引用字体总是需要填写字体的family名称,但是实际情况是字体文件的名称不总是等于family里的名称 1.mac上查找字体family名称 请确保安装了fontconfig 没有则执行 brew install fontconfig 然后执行查找命令 fc-scan -b /Users

OLDER

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

NEWER

pm2以clude模式启动nextjs应用

Recently Updated

  • nextjs15使用better-sqlite3的连接报错问题
  • nextjs + clerk + supabase + realtime 实时监听数据库更改
  • 解决nextjs15使用useLocalStorage报错的问题
  • mac上使用nodejs appium控制chrome浏览器
  • 2024年终总结

Trending Tags

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

Contents

©2025 sunday. Some rights reserved.

Using the Halo theme Chirpy