【问题标题】:Unable to find the node_modules folder in angular project在 Angular 项目中找不到 node_modules 文件夹
【发布时间】:2020-02-18 00:42:47
【问题描述】:

我使用“ng new”命令在 Visual Studio 2019 中创建了一个新的 Angular 项目。

我无法在我的应用程序中找到 node_modules 文件夹。

当我单击“显示所有文件”时,我可以看到该文件夹​​,但在 VS 2019 中带有 (-) 减号。

关于如何将其包含在项目中的任何想法。

【问题讨论】:

  • 您有什么特殊原因为什么希望node_modules文件夹位于应用程序中?
  • 我已经在我的项目中安装了 bootstrap,并希望在 angular.json 文件中包含 bootstrap.min.css 文件(位于 node_modules 文件夹中)。由于未包含 node_modules 文件夹,因此在尝试添加文件时出现错误。
  • 正常不会投诉的。只是检查一下,你完成npm install了吗?那么,您是如何在angular.json 文件中添加引导程序的呢?
  • 是的,我已经使用 npm install bootstrap@3 --save 安装了引导程序。此外,问题现在解决了,因为我在开头“./node_modules/bootstrap/dist/css/bootstrap.min.css”中添加了一个额外的.(点)。我的朋友仍然能够在解决方案资源管理器中看到该文件夹​​,但我看不到。感谢您的回复。

标签: angular node-modules visual-studio-2019


【解决方案1】:

通常,node_modules 文件夹不包含在项目中。如果要添加,可以右击,选择Include in the project选项

【讨论】:

    猜你喜欢
    • 2017-10-24
    • 2015-11-16
    • 2020-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-27
    • 1970-01-01
    相关资源
    最近更新 更多