简体   繁体   English

为什么反应应用程序中的 node_modules/.cache/babel-loader 文件夹中有数百个 json 文件?

[英]Why are Hundreds of json files in the node_modules/.cache/babel-loader folder in a react app?

Set up a react app with create-react-app.使用 create-react-app 设置反应应用程序。 Everything works fine.一切正常。 Problem: On vscode, the git tab is always showing hundreds of json files modification and creation on the folder node_modules/.cache/babel-loader .问题:在 vscode 上,git 选项卡总是在文件夹node_modules/.cache/babel-loader上显示数百个 json 文件的修改和创建。 This did not happen on my previous projects.这在我以前的项目中没有发生。

I've tried reinstalling babel with no results.我试过重新安装 babel 没有结果。 Deleting the files does nothing.删除文件没有任何作用。

files in the folder look as fallows: 0aab1329ff345c34fe844d530b69ce5d.json文件夹中的文件看起来像休耕: 0aab1329ff345c34fe844d530b69ce5d.json

If you only see created files, then you should just add node_modules to your .gitignore file.如果您只看到创建的文件,那么您应该将node_modules添加到您的.gitignore文件中。 If you see modified files, then you have already committed these to source control.如果您看到修改过的文件,那么您已经将这些文件提交给源代码控制。 You should remove them with git rm and still add node_modules to .gitignore .您应该使用git rm删除它们,并将node_modules添加到.gitignore

暂无
暂无

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

相关问题 babel-loader 和版本的问题,node_modules (npm) 中也不存在 babel-loader 文件夹 - Problem with babel-loader and version, also babel-loader folder not present in node_modules (npm) 如何使用 babel-loader 转译 node_modules 模块? - How to transpile node_modules modules with babel-loader? React 应用程序的编译错误:模块构建失败(来自./node_modules/babel-loader/lib/index.js) - Compile error for a React app: Module build failed (from ./node_modules/babel-loader/lib/index.js) Webpack 2 - babel-loader - 如何排除node_modules? - Webpack 2 - babel-loader - how to exclude node_modules? 为什么在使用 babel-loader 时要排除 node_modules? - Why would we exclude node_modules when using babel-loader? 反应构建错误:模块构建失败(来自 ./node_modules/babel-loader/lib/index.js): - React build error: Module build failed (from ./node_modules/babel-loader/lib/index.js): 模块构建失败(来自 ./node_modules/babel-loader/lib/index.js) - Module build failed (from ./node_modules/babel-loader/lib/index.js) 错误:模块构建失败(来自 ./node_modules/babel-loader/lib/index.js):语法错误: - Error: Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: 模块构建失败(来自./node_modules/babel-loader/lib/index.js): - Module build failed (from ./node_modules/babel-loader/lib/index.js): 模块构建失败(来自 ./node_modules/babel-loader/lib/index.js)Vue Js - Module build failed (from ./node_modules/babel-loader/lib/index.js) Vue Js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM