next.js 如何解决默认导出不是页面中的React组件的错误:“/"?[关闭]

new9mtju  于 2023-08-04  发布在  React
关注(0)|答案(1)|浏览(166)

**已关闭。**此问题需要debugging details。它目前不接受回答。

编辑问题以包括desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答这个问题。
5天前关闭。
Improve this question
错误:默认导出不是页面中的React组件:“/”
调用堆栈createComponentTree文件:/C:/Users/Aakarsh-sharma/Desktop/promptia/node_modules/next/dist/server/app-render/app-render.js(473:27)异步文件:/C:/Users/Aakarsh-sharma/Desktop/promptia/node_modules/next/dist/server/app-render/app-render.js(860:60)
我试着在localhost:3000服务器上运行my.next JS代码,但每次都得到这个错误

rseugnpd

rseugnpd1#

确保你的组件在.jsx文件中(而不是.js文件)

相关问题