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

site包 pnpm run build 报错 .ts 扩展不支持 #5570

Closed
vaynevayne opened this issue Mar 19, 2024 · 6 comments · Fixed by #5571
Closed

site包 pnpm run build 报错 .ts 扩展不支持 #5570

vaynevayne opened this issue Mar 19, 2024 · 6 comments · Fixed by #5571

Comments

@vaynevayne
Copy link
Contributor

问题描述

image

重现链接

https://codesandbox.io/s/new)

重现步骤

执行

cd packages/site`
pnpm run build

预期行为

正常构建

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...] macos
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • G6 版本: [4.5.1 ... ] 5.0.0-beta.29

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

vaynevayne pushed a commit to vaynevayne/G6 that referenced this issue Mar 19, 2024
@Aarebecca
Copy link
Contributor

检查下 ts-node 环境

@vaynevayne
Copy link
Contributor Author

System: OS: macOS 12.0.1 CPU: (8) arm64 Apple M1 Memory: 114.34 MB / 16.00 GB Shell: 5.8 - /bin/zsh
指这个吗?

@Aarebecca
Copy link
Contributor

System: OS: macOS 12.0.1 CPU: (8) arm64 Apple M1 Memory: 114.34 MB / 16.00 GB Shell: 5.8 - /bin/zsh 指这个吗?

你执行下 ts-node -v 看看有没有输出

@vaynevayne
Copy link
Contributor Author

vaynevayne commented Mar 20, 2024

pnpm exec ts-node -v v10.9.2
ts-node -v 没输出
我模糊记得 scripts里写的 ts-node 等价于命令行的pnpm exec ts-node,所以我这环境没问题?

@Aarebecca
Copy link
Contributor

应该是你的 ts-node 环境导致的,使用 npm i ts-node -g 安装后再尝试下

@vaynevayne
Copy link
Contributor Author

好,

tsx -v   // zsh:  command not found: tsx
 pnpm exec tsx -v //  tsx v4.7.1

hustcc pushed a commit that referenced this issue Mar 21, 2024
* build(site): fix #5570

* docs(CONTRIBUTE): fix spell error

* Update package.json

* Update package.json

---------

Co-authored-by: yxf <1848212420@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants