2014-03-31 3 views
6

Ich versuchte {myrepo}: git://[email protected]/{myaccount}/{myrepo}.git in packages.json. Auf meinem lokalen Rechner, wenn ich sudo npm install eintippe (ich muss sudo verwenden) funktioniert es und mein Repo wird zu node_modules geklont.Wie öffentliche Bitbucket Repo als NPM-Modul in package.json auf Heroku verweisen?

Wenn ich meine App Heroku bin schieben es Fehler:

 npm ERR! git clone git://[email protected]/{myaccount}/{myrepo}.git Initialized empty Git repository in /app/.npm/_git-remotes/git-git-bitbucket-org-{myaccount}-{myrepo}-git-bd17f867/ 
     npm ERR! git clone git://[email protected]/{myaccount}/{myrepo}.git 
     npm ERR! git clone git://[email protected]/{myaccount}/{myrepo}.git fatal: Unable to look up [email protected] (Unknown host) 
     npm ERR! Error: Command failed: fatal: Unable to look up [email protected] (Unknown host) 
     npm ERR! 
     npm ERR!  at ChildProcess.exithandler (child_process.js:637:15) 
     npm ERR!  at ChildProcess.EventEmitter.emit (events.js:98:17) 
     npm ERR!  at maybeClose (child_process.js:743:16) 
     npm ERR!  at Socket.<anonymous> (child_process.js:956:11) 
     npm ERR!  at Socket.EventEmitter.emit (events.js:95:17) 
     npm ERR!  at Pipe.close (net.js:465:12) 
     npm ERR! If you need help, you may report this *entire* log, 
     npm ERR! including the npm and node versions, at: 
     npm ERR!  <http://github.com/npm/npm/issues> 

Dies ist PUBLIC Repo. Was mache ich falsch?

Antwort

15

Verwenden Sie stattdessen git+https://bitbucket.org/{user}/{repo}.git.

Oder git+ssh://[email protected]/{user}/{repo}.git wenn Sie es über ssh abrufen möchten, aber ich würde es nicht empfehlen, da es Auth erfordert.

0

@ Alexanders Antwort funktionierte für mich vorher, aber heute musste ich die URL aktualisieren, um bitbucket:{user}/{repo} zu verwenden - und stellen Sie sicher, dass das package.json das Feld "name" korrekt hat.

Verwandte Themen