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

[Bug] npm run build error #500

Open
AnkerLeng opened this issue Jul 3, 2024 · 8 comments
Open

[Bug] npm run build error #500

AnkerLeng opened this issue Jul 3, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@AnkerLeng
Copy link

\electron-vite-project\node_modules\vue-tsc\bin\vue-tsc.js:68
throw err;
^
Search string not found: "for (const existingRoot of buildInfoVersionMap.roots) {"
(Use node --trace-uncaught ... to show where the exception was thrown)

Node.js v20.15.0

@AnkerLeng AnkerLeng added the bug Something isn't working label Jul 3, 2024
@bsneric
Copy link

bsneric commented Jul 30, 2024

确实是个 Bug,我在 MacOS 上也有这样的问题,Windows 还没试过,开发人员计划什么时候解决呢?

@speauty
Copy link

speauty commented Aug 1, 2024

确实是个 Bug,我在 MacOS 上也有这样的问题,Windows 还没试过,开发人员计划什么时候解决呢?

我也遇到了,跟踪到代码,好像是对高版本ts的兼容处理,在node_modules\vue-tsc\bin\vue-tsc.js里面,然后我就不知道怎么处理了,才接触electron,有点懵,直接删了吗?

@RSS1102
Copy link
Member

RSS1102 commented Aug 1, 2024

@speauty 能提供最小复现吗?

@speauty
Copy link

speauty commented Aug 1, 2024

@speauty 能提供最小复现吗?

最小复现?typescript版本5.5.4,然后vue-tsc版本1.8.27,我看了node_modules\typescript\lib\tsc.js里面确实找不到node_modules\vue-tsc\bin\vue-tsc.js指定替换的相关字符串"for (const existingRoot of buildInfoVersionMap.roots) {",在tsc.js里面检索buildInfoVersionMap.roots倒是有两个记录。npm create vite@latest才安装的electron-vue,win环境,Node.js v20.11.1。

@speauty
Copy link

speauty commented Aug 1, 2024

image
应该就是这两个包。。。在一起,有毒吧

@RSS1102
Copy link
Member

RSS1102 commented Aug 1, 2024

可能是vue-tsc对于最新版typescript版本处理的问题,你可以多尝试几个版本(可以切换比较旧的typescript版本),或者在 language-tools查找是否有相关的问题。

@speauty
Copy link

speauty commented Aug 1, 2024

可能是vue-tsc对于最新版typescript版本处理的问题,你可以多尝试几个版本(可以切换比较旧的typescript版本),或者在 language-tools查找是否有相关的问题。

已经解决。vue-tsc直接更新到最新版本(2.0.28)即可,https://github.com/vuejs/language-tools/blob/master/packages/tsc/package.json

@QC-Fan
Copy link

QC-Fan commented Dec 13, 2024

image
是我版本有问题吗,更新了还是报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants