提问人:Before The Empire 提问时间:11/17/2023 最后编辑:Before The Empire 更新时间:11/17/2023 访问量:36
未捕获的语法错误:无效或意外的令牌:3000/__next
Uncaught SyntaxError: Invalid or unexpected token :3000/__next
问:
获取未捕获的 SyntaxError:在本地运行 next 14.0.3 时令牌无效或意外。
Uncaught SyntaxError: Invalid or unexpected token
:3000/_next/static/c…s/app/layout.js:436
如果我让它超时,它会给我一个水化错误。 我已经注释掉了我所有的代码,只有布局组件
Unhandled Runtime Error
ChunkLoadError: Loading chunk app/layout failed.
(timeout: http://localhost:3000/_next/static/chunks/app/layout.js)
Call Stack
__webpack_require__.f.j
file:///C:/Users/atw0502d/source/repos/mysite/site/.next/static/chunks/webpack.js (853:29)
<unknown>
file:///C:/Users/atw0502d/source/repos/mysite/site/.next/static/chunks/webpack.js (155:40)
Array.reduce
<anonymous>
__webpack_require__.e
file:///C:/Users/atw0502d/source/repos/mysite/site/.next/static/chunks/webpack.js (154:67)
fn.e
file:///C:/Users/atw0502d/source/repos/mysite/site/.next/static/chunks/webpack.js (391:50)
loadChunk
node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-client.browser.development.js (202:31)
preloadModule
node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-client.browser.development.js (128:0)
resolveModule
node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-client.browser.development.js (1756:0)
processFullRow
node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-client.browser.development.js (1827:0)
processBinaryChunk
node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-client.browser.development.js (1975:0)
progress
node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-client.browser.development.js (2055:0)
警告:补水过程中发生错误。在 <#document> 中,服务器 HTML 已替换为客户端内容
import './globals.css';
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
import Header from './header/page';
import Footer from './footer/page';
import Link from 'next/link';
import styles from './Styles.module.css';
import { Suspense } from 'react';
import { Skeleton } from '@mui/material';
const inter = Inter({ subsets: ['latin'] });
export const metadata: Metadata = {
title: 'Site ',
description: 'My Site',
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" id="page-container">
<body className={`${inter.className} `}>
<div className="w-screen bg-white">
<Suspense fallback={<Skeleton width={1500} height={200}></Skeleton>}>
<Link
href="#main"
className={styles.stmcl}
style={{ width: '300px' }}
>
Skip To Content
</Link>
</Suspense>
</div>
<div>
<div className="bg-white" style={{ display: 'block' }}>
<Suspense
fallback={<Skeleton width={1500} height={200}></Skeleton>}
>
<Header />
</Suspense>
<main id="content" className="min-h-[40em] w-full">
<Suspense
fallback={<Skeleton width={1500} height={200}></Skeleton>}
>
{children}
</Suspense>
</main>
</div>
<Suspense fallback={<Skeleton width={1500} height={200}></Skeleton>}>
<Footer />
</Suspense>
</div>
</body>
</html>
);
}
答: 暂无答案
评论