vite-plugin-checker icon indicating copy to clipboard operation
vite-plugin-checker copied to clipboard

开启 vue-tsc 在使用过程中,不知道什么时候会崩溃

Open Miofly opened this issue 2 years ago • 4 comments

Describe the bug

如图所示

image

Reproduction

项目采用的是 pnpm ,在使用过程中,一般情况下不会出现这种情况,但是总会出现,根据报错是 lib/checkers/vueTsc/typescript-vue-tsc/package.json 这个文件没有了。但在开发过程中其实没做什么特殊操作,不知道为什么就崩溃了

Expected behavior

vue-tsc

System Info

System:
    OS: macOS 12.3.1
    CPU: (8) arm64 Apple M1
    Memory: 78.97 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.0.0 - ~/.nvm/versions/node/v16.0.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.5.4 - ~/.nvm/versions/node/v16.0.0/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Safari: 15.4

Additional context

No response

Validations

  • [X] Read the docs.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Miofly avatar Jul 30 '22 02:07 Miofly

有稳定的复现步骤吗

fi3ework avatar Jul 30 '22 03:07 fi3ework

有稳定的复现步骤吗

测试了一会,复现不出来,总是几天崩溃一次,然后重新安装包,不知道是 pnpm 的问题,还是什么问题,后续复现我再关注下

Miofly avatar Jul 30 '22 04:07 Miofly

现在有一个复现比较高的情况,比如我在一个 vite 插件里写了一个错误的代码,然后运行报错,这时候我重新执行 Pnpm install,然后在重新运行项目会发现图二中 VueTsc 中的 typescript 中的 package.json 以及 node_modules 没了,(也不是百分百能复现) image

image

不知道是否与 pnpm 的包提升有关系我现在的配置如下

public-hoist-pattern[]=*
ignore-workspace-root-check=true
strict-peer-dependencies=false

Miofly avatar Aug 05 '22 00:08 Miofly

这个问题我也遇到过,很奇怪,有时候又是奇奇怪怪的就好了

emosheeep avatar Aug 16 '22 09:08 emosheeep

tracks in #129 . Should be fixed in 0.5.0. Have a try.

fi3ework avatar Oct 10 '22 16:10 fi3ework