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

build 后若删除 .farm,导致之后的 npm dev 报错 #1261

Closed
LiMao00 opened this issue Apr 29, 2024 · 2 comments · Fixed by #1301
Closed

build 后若删除 .farm,导致之后的 npm dev 报错 #1261

LiMao00 opened this issue Apr 29, 2024 · 2 comments · Fixed by #1301

Comments

@LiMao00
Copy link

LiMao00 commented Apr 29, 2024

Steps to reproduce

示例仓库:https://gitee.com/limao-xs/farm-test-bug

重现步骤:

  • pnpm i
  • pnpm dev
  • pnpm build
  • 删除 .farm
  • pnpm dev

报错如下图:
image

What is expected?

正常执行

What is actually happening?

定位到引起报错的位置是 shadcn/ui 的 <HoverCard> 组件,若是移除该组件,重现步骤不会报错
image

预测:<HoverCard> 组件的 tailwind.css 导致报错。代码如下:
image

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
    Memory: 1.24 GB / 7.89 GB
  Binaries:
    Node: 16.18.0 - C:\Program Files\nodejs\node.EXE     
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD       
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD        
    pnpm: 8.15.4 - C:\Program Files\nodejs\pnpm.CMD      
  Browsers:
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    @farmfe/core: ^1.1.2 => 1.1.2

Any additional comments?

No response

@wre232114
Copy link
Member

image

unocss 里面限定 src 目录就可以了,这个是 unocss 的配置问题

@LiMao00
Copy link
Author

LiMao00 commented May 13, 2024

unocss 里面限定 src 目录就可以了,这个是 unocss 的配置问题

确实解决了问题 感谢

@LiMao00 LiMao00 closed this as completed May 13, 2024
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