0

package.jsonファイルの依存関係をリモートbeanstalkリポジトリに設定して、プロジェクトに含めようとしています。

現在、次のように設定されています。

{
  "name": "SOME_NAME",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "SOME_MODULE_NAME" : "git@xxx.beanstalkapp.com:/xxx.git#v0.0.1"
  }
}

ただし、これは次のnpmエラーを返します。

npm WARN package.json SOME_NAME@0.0.1 No README.md file found!
npm http GET https://registry.npmjs.org/SOME_MODULE_NAME
npm http 404 https://registry.npmjs.org/SOME_MODULE_NAME
npm ERR! 404 'SOME_MODULE_NAME' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

Beanstalk URLをバイパスし、グローバルリポジトリ内のモジュールの検索にフォールバックするようです。何か考え/提案はありますか?

また、git + ssh://スタイルのURLを利用してみましたが無駄になりました。

ありがとう!

4

1 に答える 1

1

「依存関係としてのGitURL」を参照してください

GitのURLは次の形式にすることができます:

git://github.com/user/project.git#commit-ish
git+ssh://user@hostname:project.git#commit-ish
git+ssh://user@hostname/project.git#commit-ish
git+http://user@hostname/project/blah.git#commit-ish
git+https://user@hostname/project/blah.git#commit-ish

commit-ishは、git checkoutの引数として指定できる任意のタグ、sha、またはブランチにすることができます。デフォルトはmasterです。

URLは次のようになります。

"git://xxx.beanstalkapp.com/xxx.git#v0.0.1"
于 2012-07-27T23:12:52.480 に答える