Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issues #605

Closed
aantonop opened this issue Mar 28, 2015 · 7 comments
Closed

Installation issues #605

aantonop opened this issue Mar 28, 2015 · 7 comments

Comments

@aantonop
Copy link

I'm not very familiar with node, so forgive me if I'm missing something obvious.

Trying to install on ubuntu 14 LTS, with freshly compiled node.js (0.12.1).

npm install will crash out with errors trying to build dependencies base58-native (0.6.2) and bignum. Both of these have bugs in the specific versions "locked" in the dependency tree.

I've tried to build insight-api and insight-bitcore-api and other sub-dependencies on their own, or build the latest base58-native. I can't get npm to override the dependent version, so it always tries to build the old version in one of the sub-dependencies anyway.

Any suggestions or advice?

@matiu
Copy link
Collaborator

matiu commented Mar 28, 2015

Hey Andreas, what an honor you have you around! :)

We are on the process of replacing Insight with Bitcore-node (https://github.com/bitpay/bitcore-node) but the latter is not ready yet. Bitcore-nore will have a much better architecture and will use the new Bitcore.

In the mean time, we have updated Insight dependencies a couple of weeks ago (ping @matiaspando) to make it work on OSX. Let us check with Ubuntu 14 LTS and we will get back to you.

@cmgustavo
Copy link
Member

Hello Andreas,
I did a fresh installation on Ubuntu 14.04LTS of insight to try reproduce the error, but npm install was successful. My node version is 0.10.38 and I just did a git clone git@github.com:bitpay/insight.git and npm install. It took me a time to download all dependencies (including insight-bitcore-api). One more thing, as I have others node’s app in my Ubuntu and I installed some package as administrator, I had to remove the .npm hidden folder to avoid writing permissions before doing npm install.

My suggestion is try to remove this folder and run npm install again.

rm ~/.npm; npm install

Or install the default version of node (0.10.25). Let us know how it is going

@levino
Copy link

levino commented Mar 30, 2015

@aantonop You might want to take a look at NVM. I had issues with node 0.12 and bitcore too. Switched back to a 0.10.x version.

@maraoz
Copy link
Contributor

maraoz commented Mar 30, 2015

I can confirm npm install didn't work for me with node version v0.12.0, but did work after switching to v0.10.36. To easily switch between node versions I use n

@aantonop
Copy link
Author

Thank you, that fixed it. I should not have tried to install the latest node, it doesn't work with 0.12. Instead, I used node v 0.10.36 and it worked

I installed "n", as suggested by Manuel, to make it easier to switch versions of node.

$ sudo npm install -g n
$ sudo n 0.10.36

then followed the instructions to download and build insight. "npm install" worked without any errors and I now have a running insight server.

Thank you!

@maraoz
Copy link
Contributor

maraoz commented Mar 30, 2015

@aantonop thanks for reporting back with instructions for future reference! :)

@levino
Copy link

levino commented Mar 31, 2015

Installing node in a way that sudo is needed to execute npm install is kind of dangerous. With sudo npm install you are basically handing over your computer to the maintainers of the package you are using. It is possible to install node and npm for the user and not globally and as such not requiring root access for npm install (not even npm install -g). Here are some ways on how to achieve it: https://gist.github.com/isaacs/579814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants