antvis/G6

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

vaynevayne posted onGitHub

问题描述

<img width="1052" alt="image" src="https://github.com/antvis/G6/assets/124666577/6f580934-e77c-4a76-aa89-dd2928287b06">

重现链接

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


检查下 ts-node 环境

posted by Aarebecca about 1 year ago

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

posted by vaynevayne about 1 year ago

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 看看有没有输出

posted by Aarebecca about 1 year ago

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

posted by vaynevayne about 1 year ago

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

posted by Aarebecca about 1 year ago

好,

tsx -v   // zsh:  command not found: tsx
 pnpm exec tsx -v //  tsx v4.7.1
posted by vaynevayne about 1 year ago

Fund this Issue

$0.00
Funded

Pull requests