Closed KennethNagin closed 7 years ago
have you tried npm install
?
npm install also fails: npm ERR! Linux 3.19.0-25-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v7.1.0 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE
npm ERR! grpc@0.13.2-pre1 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@0.13.2-pre1 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grpc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs grpc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls grpc
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/nagin/work/src/github.com/fabric-boilerplate/npm-debug.log
sudo npm install has a different error: ../src/node/ext/byte_buffer.cc: In function \u2018v8::Localv8::Value grpc::node::MakeFastBuffer(v8::Localv8::Value)\u2019: ../src/node/ext/bytebuffer.cc:100:72: warning: \u2018v8::Localv8::Object v8::Function::NewInstance(int, v8::Localv8::Value) const\u2019 is deprecated (declared at /home/nagin/.node-gyp/7.1.0/include/node/v8.h:3287): Use maybe version [-Wdeprecated-declarations] Local
I'm not sure that this is relevant but the last error is: npm ERR! grpc@0.13.2-pre1 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@0.13.2-pre1 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grpc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
What are the versions of node and npm?
$ npm -version 3.10.9 $ nodejs -v v7.1.0
$ node -v v6.9.1 $ npm -version 3.10.8
Try installing those versions, I had troubles with nodejs >7
I think a few of these issues could be resolved by updating the version of hfc
that is being used. grpc
, which is an hfc
dependency, is a real pain to get to build in 0.13.2
. Newer versions of hfc
use an updated version of this package. This demo's hfc
version should be bumped to 0.5.4
if the intent is to keep running against v0.5 fabric networks, or 0.6.5
if the demo is going to be used against bluemix or the newer docker compose offering.
Here is the docker-compose offering that I was talking about:
I will take a look at the hfc and docker-compose next week. For now this is update do downgrading node and npm: I install node v6.9.1 and npm 3.10.8 but it was not easy since apt-get does not support these versions. Instead I had to get a tarball for node and use npm to downgrade itself. I add this info since it might be the source of the problem. With the version change sudo npm install but unfortunately sudo npm start fails.
Details are list below:
$tar -xvf node-v6.9.1-linux-x64.tar.xz copied node to /usr/bin $sudo npm install -g npm@3.1 $ sudo npm -v 3.10.8 nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo node -v v6.9.1 nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo npm install npm WARN lifecycle server@0.0.0~postinstall: cannot run in wd %s %s (wd=%s) server@0.0
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ npm start
server@0.0.0 start /home/nagin/work/src/github.com/fabric-boilerplate npm run build-css | npm run watch-css | npm run nodemon
server@0.0.0 nodemon /home/nagin/work/src/github.com/fabric-boilerplate GOPATH=$(pwd) nodemon ./bin/www
sh: 1: nodemon: not found
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "nodemon"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! server@0.0.0 nodemon: GOPATH=$(pwd) nodemon ./bin/www
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the server@0.0.0 nodemon script 'GOPATH=$(pwd) nodemon ./bin/www'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! GOPATH=$(pwd) nodemon ./bin/www
many many error methods follow.
Hi @KennethNagin, some ideas which come out from your logs:
npm install -g nodemon node-sass
)/usr/local/lib/node_modules
in order to give access to your no-root user (sudo chown -R $(whoami) /usr/local/lib/node_modules
)I have the same issue. npm install nodemon
fixes it. It looks like nodemon
is missing from package.json
.
npm install nodemon seems to fix the problem.
I am trying use the fabric-boilerplate. I followed your instructions up to the npm start, but it fails. The fabric docker instances seem to be running properly: nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo docker ps [sudo] password for nagin: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8fbb050f8977 rikmoedt/fabric-peer:0.5-dp "sh -c 'sleep 5; peer" 25 minutes ago Up 25 minutes fabricboilerplate_vp1_1 567c1144a10f rikmoedt/fabric-peer:0.5-dp "sh -c 'sleep 5; peer" 25 minutes ago Up 25 minutes 0.0.0.0:7050-7051->7050-7051/tcp fabricboilerplate_vp0_1 561b339f7fb7 rikmoedt/fabric-membersrvc:0.5-dp "membersrvc" 25 minutes ago Up 25 minutes 0.0.0.0:7054->7054/tcp fabricboilerplate_membersrvc_1
However the npm start fails:
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo npm start
sh: 1: node-sass: not found
sh: 1: node-sass: not found
sh: 1: nodemon: not found
npm ERR! Linux 3.19.0-25-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "nodemon" npm npmERR! node v7.1.0 npm ERR! npm v3.10.9 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! npmerrno ENOENT
There many many npm ERR messages after that.
What do you suggest?
--Ken