简体   繁体   English

为什么要在vscode中使用相同文件添加缺少的导入打开新标签页?

[英]Why add missing import open new tab with the same file in vscode?

Hi I have an issue with my ide vscode from some time (like 2weeks ago it was all fine !) I searched but didnt found. 嗨,我的ide vscode出现了问题(例如2周前,一切都很好!),我进行了搜索,但没有找到。

when im missing some import in vscode in my angular project but onlt in few components (not all ? ) When i chose 'add missing import' or 'add all missing imports' instead of just adding it at the top - it opens new tab with the same file and added imports. 当我在我的角度项目中缺少vscode中的某些导入但在少数组件中(不是全部?)打开时,当我选择“添加缺失的导入”或“添加所有缺失的导入”而不是仅在顶部添加时,它会打开新标签相同的文件并添加了导入。 what I did wrong ? 我做错了什么? I splited so you can see that from the top is still missing so red underline after clicked add all... but on bottom it is automaticly opened second tab of the same file and with imports. 我拆分了一下,所以您可以看到在单击添加全部后,顶部仍然缺少红色下划线,但是在底部它是自动打开了同一文件的第二个选项卡,并带有导入。

please advice 请指教

i tryied reinstalling / removing all extensiont / deleted config. 我尝试重新安装/删除所有extensiont /已删除的配置。 在此处输入图片说明

thanks 谢谢

edit 编辑

the solution i figured out is rename modules to Modules folder... (does not known why ) or rename component - in this screen Module name was the same as component name. 我想出的解决方案是将模块重命名为Modules文件夹...(不知道为什么)或重命名组件-在此屏幕中,模块名称与组件名称相同。 also i does not known why this is issue for ide... ? 我也不知道为什么这是我的问题...?

yep it is naming issue - in soem service now i have same issue, when it open in second tab it open same file but showing name of file starting from uppercase. 是的,这是命名问题-现在在soem服务中,我也遇到同样的问题,当它在第二个选项卡中打开时,它会打开相同的文件,但显示文件名的开头是大写。 if i changed this file name to Upercase first letter and it is fine - where search for issue ? 如果我将此文件名更改为Upercase首字母,并且很好-在哪里搜索问题? could it be node.js some sase sensitive / insensitive settings ? 可能是node.js一些敏感/不敏感的设置吗? regards 问候

This a bug in VS Code 1.38 related to path case. VS Code 1.38中的此错误与路径情况有关。 The file you have on top as a lowercase modules while the one below has an uppercase Modules 您最上方的文件为小写modules而下方的文件为大写Modules

The issue is tracked here 在此跟踪问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM