CNode

nodejs的node_modules在svn下的奇怪问题。

问答
Yyooluo发布于11 年前最后回复11 年前4 回复5424 浏览0 收藏

使用express+multer文件上传,在本地使用没有问题,当把模块提交到svn后,再启动express服务就报错误了,看这个错误信息是模块文件夹下出现.svn文件夹引起的错误,由于目前没有办法换源码管理器,有什么办法绕过这个错误吗?

error: uncaughtException: Cannot find module '/node/node_modules/multer/node_modules/busboy/lib/types/.svn' date=Tue Oct 20 2015 21:34:13 GMT+0800 (CST)

看代码是在这一块出的问题,他把整个types文件夹都载入了,正好这个文件夹下有.svn,所以就出错了。 QQ截图20151020222150.png

查看回复

回复 (4)

J
JacksonTian#1·11 年前

node_modules就别提交进去了啦

L
luoyjx#2·11 年前

svn没有.gitignore这么方便的东东

L
leapon#3·11 年前

多年前用svn的时候,可以排除特定文件

狗出结果如下:

To ignore all files with the ending .jpg use:

svn propset svn:ignore "*.jpg" .

If you want to ignore multiple files or folders use:

svn propedit svn:ignore .

This will bring up your text editor so you can enter a list of files or directories to ignore.

Z
zxc122333#4·11 年前

你的SVN客户端版本太低了,现在的svn不会在每个目录层次都放一个.svn了

参与回复
登录后即可参与回复。登录