解决idea2024.3.3版本Vue插件报【Vue: TypeError: ctxVars.at is not a function at forEachInterpolationSegment】错
- 错误关键信息[Vue: TypeError: ctxVars.at is not a function at forEachInterpolationSegment]
- 注:本文中文件路径为我们自己安装idea的实际路径,本文路径仅做参考
错误关键信息[Vue: TypeError: ctxVars.at is not a function at forEachInterpolationSegment]
Vue: TypeError: ctxVars.at is not a function at forEachInterpolationSegment (F:\developTool\ideaIU-2024.3.3.win\plugins\vuejs\vue-language-server\bin\vue-language-server.js:47026:33) at forEachInterpolationSegment.next ( ) at。
问题详情截图:
idea_7">注:本文中文件路径为我们自己安装idea的实际路径,本文路径仅做参考
根据错误信息分析可知,获取循环变量元素方式错误,通过报错信息打开报错的文件路径在文件夹中,案例路径:【F:\developTool\ideaIU-2024.3.3.win\plugins\vuejs\vue-language-server\bin\】,使用自己的编辑器打开文件路劲下的文件【vue-language-server.js】,并将【47026】行,代码注释掉更换为:【const lastVar = ctxVars[ctxVars.length - 1];】
报错代码:
const lastVar = ctxVars.at(-1);
修正代码:
const lastVar = ctxVars[ctxVars.length - 1];
修改后的代码图片:
修改完毕后保存,重启idea
IDea重新打开后错误信息已经不再出现了
哈哈哈,,,致此问题解决,,,朋友们是不是心情舒畅多了呢!!!