Astro+ React 应用程序构建错误:(1:0) 使用 sourcemap 报告错误时出错:无法解析错误的原始位置

问题描述 投票:0回答:1

我正在尝试通过运行命令来构建应用程序

npm run build
但出现以下错误

(1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.

(1:0) Module level directives cause errors when bundled, "use client" in "src/components/publicProfile/OrganisationPublicProfile.tsx" was ignored.

尝试构建没有错误的应用程序

reactjs deno astrojs
1个回答
0
投票

正如 @Alex 在他们的评论中所说,删除 React 文件中的任何

'use client'
指令。

Astro 不需要这个指令

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.