I tried {myrepo}: git://[email protected]/{myaccount}/{myrepo}.git
in packages.json. On my local machine when I type sudo npm install
(I have to use sudo
) it works and my repo is cloned to node_modules.
When I am pushing my app to heroku there are errors:
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>
This is PUBLIC repo. What I am doing wrong?
To npm install a public project that is hosted on Github, and not the NPM registry, add the Github repo to package. json dependencies using the username/repo#branch-name format. Run npm install and npm will download the project and save it into your /node_modules/ folder.
Use the npm publish pipe to publish the package to the npm registry. To publish to a private npm package, edit your package. json to add a section like the example below.
Try to use git+https://bitbucket.org/{user}/{repo}.git
instead.
Or git+ssh://[email protected]/{user}/{repo}.git
if you want to fetch it over ssh, but I wouldn't recommend it, since it requires auth.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With