2014-03-31 42 views
6

我在packages.json中尝试了{myrepo}: git://[email protected]/{myaccount}/{myrepo}.git。在我的本地机器上键入sudo npm install(我必须使用sudo)时,它可以正常工作,我的repo被克隆到node_modules。如何在heroku的package.json中将public bitbucket repo引用为npm模块?

当我推我的应用程序的Heroku有错误:

 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> 

这是PUBLIC回购。 我做错了什么?

回答

15

尝试使用git+https://bitbucket.org/{user}/{repo}.git代替。

git+ssh://[email protected]/{user}/{repo}.git如果你想通过ssh获取它,但我不会推荐它,因为它需要授权。

0

@ alex的回答以前是为我工作的,但是今天我不得不更新url以使用bitbucket:{user}/{repo} - 并确保package.json的"name"字段正确。

相关问题