fix:fix errors in console

This commit is contained in:
fly6516 2025-02-27 09:53:04 +08:00
parent 76eab0ff6c
commit 88ef4e2d63
3 changed files with 3 additions and 13 deletions

View File

@ -1,17 +1,7 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
webpack(config, { isServer }) {
// 仅在服务器端处理 .node 文件
if (isServer) {
config.module.rules.push({
test: /\.node$/,
use: 'node-loader', // 使用 node-loader 处理 .node 文件
});
}
return config;
},
serverExternalPackages: ["dockerode"],
};
export default nextConfig;

View File

@ -13,6 +13,7 @@
"axios": "^1.7.9",
"dockerode": "^4.0.2",
"next": "15.1.3",
"nextjs-node-loader": "^1.1.9",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
@ -29,7 +30,6 @@
"eslint-config-next": "15.1.3",
"html-webpack-plugin": "^5.6.3",
"jest": "^29.7.0",
"node-loader": "^2.1.0",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"ts-jest": "^29.2.5",

View File

@ -23,7 +23,7 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html lang="en" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>