简体   繁体   English

从Package.json和Node_modules文件夹中删除依赖项

[英]Remove dependencies from Package.json and Node_modules folder

从package.json文件中删除依赖项列表之后,我想使用一些命令从node_modules目录中将其删除,而不必再次指定每个包名称。

从package.json文件中删除条目后,运行npm update

Try the npm-prune command. 尝试使用npm-prune命令。 Also npm-clean might be usefull 另外npm-clean可能有用

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

相关问题 如何从node_modules文件夹添加您的package.json依赖项? - How to add your package.json dependencies from node_modules folder? npm 卸载会从 package.json 中删除 package,但不会从 node_modules 文件夹中删除它 - npm uninstall removes the package from package.json but doesn't remove it from node_modules folder 从现有的 Node_Modules 文件夹构建 Package.Json? - Build Package.Json From Existing Node_Modules Folder? 我可以通过package.json将依赖项加载到node_modules以外的单独文件夹中吗 - can I load dependencies in a separate folder other than node_modules via package.json 如何清除不在 package.json 中的包的 node_modules 文件夹? - How to clean node_modules folder of packages that are not in package.json? 如何立即将node_modules中的所有依赖项添加到package.json? - How can I add all dependencies from node_modules to package.json at once? 如何从被入侵的node_modules文件夹中制作package.json - How to make a package.json from hacked node_modules folder 如何从package.json中列出的node_modules中删除所有软件包 - How to remove all packages from node_modules that are listed in package.json 如何将 package.json 与 node_modules 分开 - How to separate package.json from node_modules 如何从 node_modules 目录恢复 package.json - How to recover package.json from node_modules directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM