node.js - 恢复node_modules文件夹

标签 node.js angular visual-studio node-modules

我不小心从解决方案中删除了 MyProject/node_modules 文件夹。

有什么办法可以重新创建这个文件夹吗?

我尝试了npm installnpm update但没有成功。

最佳答案

有一个npm package它将搜索您的源代码并创建依赖项列表。

如果您创建一个新的 package.json (使用 npm init),然后在项目目录中运行依赖项检查,该文件将被填充。然后只需运行 npm install 即可。

关于node.js - 恢复node_modules文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50262538/

相关文章:

node.js - 渲染页面,同时使 http 请求变得明确

node.js - 在 Node.js 中同步使用另一个文件中的返回值

javascript - Node.js/ express : respond immediately to client request and continue tasks in nextTick

Angular 4 : Disabling nested form validators

C++ 通用 Windows 应用程序仅在安装驱动器上的 VS2015 项目时有效

angularjs - 如何在 Nodejs、ExpressJS 中使用外部 js 文件

Angular:无法读取未定义的属性 'call'(引导时)

angular - "Component X is not part of any NgModule"在 Angular 4 中延迟加载的模块错误

visual-studio - Visual Studio 2012和2013在启动时崩溃

c++ - 有没有办法自动避免进入 Visual Studio 中的某些功能?