视觉代码和nodejs,未安装的软件包名称空间的推断

发布于 2025-02-13 16:12:50 字数 840 浏览 1 评论 0原文

我有一个烦人的问题。如果

    1. 我开始一个空白节点项目
    1. 其中没有安装的模块
    1. 我做import'',在括号之间,我按ctrl+space,我得到了一些实际上不应该存在的名称空间。<<<<<<<<<<<<<<< /li>

我承认我在学习如何编码时可能做了一些错误的操作,但是我尝试解决了许多事情:

  • 我删除了我删除的不必要的全球安装软件包,
  • 我删除了node_modules文件夹,我在>/code>中意外安装了这些文件夹。文件夹。 但是我仍然得到其中一些由VC推理引用的:

”您在此图片中可以看到的“

您可以在图像中看到的,我得到了一些随机的推断名称空间。当尝试通过在Mac上按cmd来到达原始文件夹时,VC不会突出显示并创建通常的超链接(当该软件包实际上在那里时,VC会创建一个链接以导航到引用文件)。

我怎么能摆脱那些假名的空间?希望你能帮我!

I am having an annoying issue. If

    1. I start a blank Node project
    1. no modules installed in it
    1. I do a import '', and, in between the brackets, I press ctrl+space, I get inferred some namespaces which should not actually be there.

I admit I probably did some wrong manipulation when learning how to code, but I tried to solve many of those things:

  • I deleted the unnecessary globally installed packages
  • I removed node_modules folders that I accidentally installed in my /Users folder.
    But I still get some of them referenced by VC inference:

as you can see in this picture

As you can see in the image I get some random inferred namespace. When trying to reach the originating folder by pressing cmd on Mac, VC doesn't highlight and create the usual hyperlink (when the package is actually there, VC creates a link to navigate to the references file).

How can I get rid of those fake namespaces?? hope you can help me out!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

桃扇骨 2025-02-20 16:12:50

好的,这是超级快捷的,实际上在我的/users文件夹中,我忘了删除package.json文件,该文件告诉VC,这已安装了某些内容... 。

因此,通过我的理解,如果父母文件夹包含package.json文件,则基本上传播到儿童文件夹...

很有趣!

Ok this one was super quick and simple, in fact in my /Users folder I forgot to delete a package.json file which was telling VC thats something was installed ....

so, by my understanding, if a parent folder contains a package.json file it basically propagates down to the children folders...

Interesting to know!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文