简体   繁体   English

'npm install' 在应用程序的根目录中生成了许多不必要的文件

[英]Many unnecessary files generated by 'npm install' in root directory of app

Usually when I do 'npm install' inside my application directory, bunch of npm libraries files gets generated inside node_modules folder which is expected.通常当我在我的应用程序目录中执行“npm install”时,会在 node_modules 文件夹中生成一堆 npm 库文件,这是预期的。 Today suddenly I started seeing many files getting generated inside application directory and outside node_modules.今天突然我开始看到在应用程序目录和 node_modules 外部生成了许多文件。

Did anyone face this issue ?有没有人遇到过这个问题? and if yes - any workaround ?如果是 - 任何解决方法? Screenshot attached.附上截图。 Lot's of .cmd file, don't know why they are here.很多 .cmd 文件,不知道它们为什么在这里。

我的应用程序文件夹结构

编辑您的 c:\\Users{username}.npmrc 并删除前缀。

I had the same issue, and was able to resolve this by completely uninstalling + re-installing Node/npm:我遇到了同样的问题,并且能够通过完全卸载 + 重新安装 Node/npm 来解决这个问题:

How to completely remove node.js from Windows 如何从 Windows 中完全删除 node.js

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

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