简体   繁体   English

VSCode无法在Angular项目中找到路径

[英]VSCode cannot locate path in Angular project

I am using VSCode to learn about the library ngx-bootstrap. 我正在使用VSCode来了解库ngx-bootstrap。

The problem I am having however is that VSCode cannot recognize some of the paths used in the project (and I can't either!) 但是我遇到的问题是VSCode无法识别项目中使用的某些路径(而且我也不能!)

For example, in one file, some code is imported from 'ngx-bootstrap/component-loader' yet there is no directory by that name anywhere, let alone relative to the file in question. 例如,在一个文件中,有些代码是从'ngx-bootstrap/component-loader'导入的,但在任何地方都没有该名称的目录,更不用说相对于该文件了。 ( GitHub link here ) GitHub链接在这里

My question is, how does this code work when the file references do not? 我的问题是,当文件引用不起作用时,此代码如何工作?

The problem was that npm install did not run correctly. 问题是npm install未正确运行。

Once I got it running properly, the problem disappeared 一旦我正常运行,问题就消失了

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

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