The README on GitHub tells me to do npm install bitcore
but when I run that I get errors.
Can I download the built JS library (both minified and clear) somewhere so I don’t have to build it myself?
$ npm install bitcore
npm http GET http://registry.npmjs.org/bitcore
npm http 200 http://registry.npmjs.org/bitcore
npm http GET http://registry.npmjs.org/bitcore/-/bitcore-0.10.3.tgz
npm http 200 http://registry.npmjs.org/bitcore/-/bitcore-0.10.3.tgz
npm http GET http://registry.npmjs.org/bn.js
npm http GET http://registry.npmjs.org/bs58
npm http GET http://registry.npmjs.org/elliptic
npm http GET http://registry.npmjs.org/inherits
npm http GET http://registry.npmjs.org/hash.js
npm http GET http://registry.npmjs.org/lodash
npm http GET http://registry.npmjs.org/sha512
npm http 200 http://registry.npmjs.org/inherits
npm ERR! error installing bitcore@0.10.3
npm http 200 http://registry.npmjs.org/bn.js
npm ERR! Error: No compatible version found: inherits@'inherits@2.0.1'
npm ERR! Valid install targets:
npm ERR! ["1.0.0","2.0.0","2.0.1"]
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at /usr/share/npm/lib/cache.js:375:15
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/dskloet/bitcore/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.13.0-44-generic
npm ERR! command "node" "/usr/bin/npm" "install" "bitcore"
npm ERR! cwd /home/dskloet/bitcore
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: inherits@'inherits@2.0.1'
npm ERR! message Valid install targets:
npm ERR! message ["1.0.0","2.0.0","2.0.1"]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/dskloet/bitcore/npm-debug.log
npm not ok
I’ve tried installing node before but always failed. I wasn’t aware of having any version of node installed. Isn’t the point of a package manager that it takes care of installing all the necessary dependencies? Maybe bitcore needs to declare its dependency on node v1.1.4?
So now it’s installed but I still can’t build. I installed gulp $ sudo npm install --global gulp
but when I do gulp browser I get gulp: command not found
I wish there was some tutorial that doesn’t assume all kinds of things pre-installed.
I discovered there is a symlink /usr/bin/gulp -> …/lib/node_modules/gulp/bin/gulp.js
But this directory is only readable for root. Why would npm make a globally installed package only readable for root?
I also found that some files in ~/.npm were only readable by root. This npm thing seems really broken. I’ve moved my .npm directory away and did
$ npm install gulp
(not as root this time) again.
Now when I run gulp browser I get Error: Cannot find module 'bitcore-build'.
You need to run “npm install” to download dependencies defined in “package.json”. This should create a “node_modules” directory, with “bitcore-build” and others.
You mean npm install without arguments? Do I have to do this in a specific directory?
I already have a node_modules directory with bitcore directory inside it.