npm中如何使用SVN安装模块?

How to use SVN in npm to install modules?

我尝试使用 npm 安装模块并收到此错误:

npm ERR! prepareGitDep > svn checkout https://github.com/SteamDatabase/Protobufs/trunk protobufs && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/ProtobufGen protobuf_gen && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/SteamLanguage steam_language

NPM 与 SVN 并不真正兼容,但有一种方法可以使其工作。您可以使用 npm 包 npm-svn.

要添加 SVN 依赖项,您的 package.json

中应该有这样的内容
"dependencies": {
  "npm-svn": "latest"
},
"svnDependencies": {
  "svn-module": "svn://path/to/svn/repo",
  "svn-module@tag": "svn://path/to/svn/repo",
  "svn-module@tag|revision": "svn://path/to/svn/repo",
}

查看此 link 了解更多信息