Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

错误:可能是某个间接的库造成了各种错误 #2112

Closed
GuoDapeng opened this issue May 11, 2024 · 2 comments
Closed

错误:可能是某个间接的库造成了各种错误 #2112

GuoDapeng opened this issue May 11, 2024 · 2 comments
Labels
invalid This doesn't seem right

Comments

@GuoDapeng
Copy link

Version

2.2.13

OS Version

macOS 14.4.1

Node.js Version

22.1.0

Browser Version

Google Chrome 126.0.6452.3

Link to minimal reproduction

https://github.com/GuoDapeng/dumi_test/blob/main/docs/index.md

Steps to reproduce

新建一个项目,或者以前的项目删除 pnpm-lock.yaml 或者 yarn.lock

在任意文档里面添加:

/**
 * inline: true
 */
import React from 'react';

const App: React.FC = () => {
  return <>APP</>
}
export default App;

pnpm install 或者 yarn install

启动项目 pnpm start 或者 yarn start

What is expected?

希望顺利启动

What is actually happening?

截屏2024-05-11 19 34 11

Any additional comments? (optional)

No response

@PeachScript
Copy link
Member

报错是符合预期的,原因是在 jsx 代码块里使用了 TypeScript 语法

@PeachScript PeachScript closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
@PeachScript PeachScript added invalid This doesn't seem right and removed unconfirmed labels May 13, 2024
@GuoDapeng
Copy link
Author

非常感谢,我一直存在一个实践错误。需要使用 tsx 包裹需要渲染的组件。

截屏2024-05-14 10 27 50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants