【发布时间】:2014-05-27 09:30:10
【问题描述】:
我正在尝试在 node_modules 中保留所有组件的 git 版本。 我刚刚从 .gitignore 中删除了 node_modules 文件夹,我希望在得到它之前可以顺利同步:
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json.
The file will have its original line endings in your working directory.
fatal: unable to stat 'node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt': No such file or directory
Git 在此文件上崩溃,无法找到。
当我使用资源管理器时,路径上有错误:
node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper
到
node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules.bin-wrapper
有没有正确的方法在不破坏依赖关系的情况下推入 git ?
【问题讨论】:
-
为什么要使用angularjs标签?
-
对了,刚去掉,你知道npm吗?也许你不能提供更多帮助
-
不,我不知道。出现这种情况时我正在浏览 angularjs 标签,不幸的是我不知道如何提供帮助。
-
正确的方法是根本不将node_modules文件夹包含在git存储库中。 NPM 在执行
npm install命令后通过查看package.json文件来安装所需的模块。 -
如果 NPM 出现故障,并且有一天 apt-get 从存储库中删除了 tomcat 5,我的所有项目都会崩溃吗?