10

誰かがこれを以前に見たことがあるかもしれません...私は自分のアプリに含めたいプライベートモジュールを持っています。私はこれを Gemfury の tarball として参照しており、ライブラリの複数のバージョンですべてがローカルで (常に) 正常に動作しますが、Joyent ボックスで "npm install" を実行すると以下のエラーが出力されます。

NPM はモジュールを正常にプルダウンし、レジストリで検索しようとしています (そして失敗しています)。

私は愚かなことをしていると思います。それは何ですか?

ノート:

また、package.json の git URL を介してモジュールを参照しようとしました。github.com の IP および RSA フィンガープリントを信頼するかどうかを尋ねられるため、SSH は接続しているようですが、NPM はレジストリに再度アクセスして 404 を取得します。 t ローカルで再現します。

npm http GET https://npm.fury.io/--token--/richmarr/cake-lib/-/latest.tgz
npm http 200 https://npm.fury.io/--token--/richmarr/cake-lib/-/latest.tgz
npm http GET https://registry.npmjs.org/cake-lib/0.0.10
npm http 404 https://registry.npmjs.org/cake-lib/0.0.10
npm ERR! 404 'cake-lib' 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.
npm ERR! System SunOS 5.11
npm ERR! command "/opt/nodejs/v0.10.21/bin/node" "/home/node/local/nodejs/bin/npm" "install" "https://npm.fury.io/--token--/richmarr/cake-lib/-/latest.tgz"
npm ERR! cwd /home/node/node-service/releases/2013-11-27T22-18-23.324752929
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/node/node-service/releases/2013-11-27T22-18-23.324752929/npm-debug.log
npm ERR! not ok code 0

アプリの package.json は次のとおりです。

{
  "name": "application-name",
  "version": "0.0.3",
  "private": true,
  "scripts": {
    "start": "node app.js",
    "test": "mocha"
  },
  "dependencies": {
    "express": "3.2.1",
    "sizlate": "~0.8.3",
    "newrelic": "~0.11.0",
    "passport": "~0.1.17",
    "passport-twitter": "~1.0.2",
    "passport-local": "~0.1.6",
    "connect-flash": "~0.1.1",
    "passport-http": "~0.2.2",
    "helmet": "~0.1.0",
    "express-validator": "~0.8.0",
    "async": "~0.2.9",
    "cake-lib": "https://npm.fury.io/--token--/richmarr/cake-lib/-/latest.tgz"
  },
  "engines": {
    "node": "0.10.21"
  },
  "devDependencies": {
    "mocha": "~1.13.0"
  }
}

ライブラリの package.json:

{
  "name": "cake-lib",
  "version": "0.0.10",
  "private": true,
  "description": "Data & connectivity lib",
  "main": "index.js",
  "scripts": {
    "test": "mocha",
    "pub": "npm version patch; npm pack; npm run upload",
    "upload": "curl -F package=@cake-lib-$npm_package_version.tgz https://push.fury.io/--token--; rm *.tgz"
  },
  "dependencies": {
    "scrypt": "~1.7.3",
    "mysql": "~2.0.0-alpha9",
    "awssum": "~1.1.1",
    "awssum-amazon": "~1.1.1",
    "awssum-amazon-ses": "~1.0.0",
    "stripe": "~1.3.0",
    "async": "~0.2.9",
    "apn": "~1.4.2",
    "uuid": "~1.4.1"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/richmarr/cake-lib.git"
  },
  "author": "",
  "bugs": {
    "url": "https://github.com/richmarr/cake-lib/issues"
  },
  "devDependencies": {
    "mocha": "~1.13.0"
  }
}
4

2 に答える 2