lor*_*oku 8 javascript node.js reactjs webpack next.js
我的 NextJS 应用程序如下:
应用程序/page.js
'use client';
import React from 'react';
export default function Home() {
return (<div>Testing</div>);
}
Run Code Online (Sandbox Code Playgroud)
应用程序/layout.js
export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
Run Code Online (Sandbox Code Playgroud)
当我跑步时
next dev
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
error - node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js (56:14) @ Object.get
error - Error: Cannot access default.then on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
at async Promise.all (index 0)
null
error - node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js (56:14) @ Object.get
error - Error: Cannot access default.then on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
at async Promise.all (index 0)
Run Code Online (Sandbox Code Playgroud)
我找不到任何对 default.then 的引用。有什么办法可以缩小这个错误的范围吗?我无法在网络搜索中找到此错误,因此我们将不胜感激有关该错误的任何信息。
| 归档时间: |
|
| 查看次数: |
4356 次 |
| 最近记录: |