Tools, FAQ, Tutorials:
Setup Node.js for WYFA Tests
How to Setup Node.js for WYFA (Write Your First Application) Tests?
✍: FYIcenter.com
Before performing any Node.js SDK tests on the WYFA network,
you need to setup the Node.js on your local host.
1. Make sure Node.js is installed:
$ node --version v8.10.0
2. Install required packages:
$ cd hyperledger-binaries/fabric-samples $ cd fabcar/javascript $ sudo npm install > pkcs11js@1.0.17 install /home/fyicenter/hyperledger-binaries/fabric-samples/fabcar/javascript/node_modules/pkcs11js > node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir \ '/home/fyicenter/hyperledger-binaries/fabric-samples/fabcar/javascript/node_modules/pkcs11js/build' gyp ERR! System Linux 4.15.0-1037-azure gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/fyicenter/hyperledger-binaries/fabric-samples/fabcar/javascript/node_modules/pkcs11js gyp ERR! node -v v8.10.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN fabcar@1.0.0 No repository field.
Looks like there is a problem with the pkcs11js directory.
3. Create the failed directory manually and try it again:
$ sudo mkdir -p node_modules/pkcs11js/build $ sudo npm install ... gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir \ '/home/fyicenter/hyperledger-binaries/fabric-samples/fabcar\ /javascript/node_modules/fabric-client/node_modules/pkcs11js/build'
4. Create the failed directory manually and try it again:
$ sudo mkdir -p node_modules/fabric-client/node_modules/pkcs11js/build $ sudo npm install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir \ '/home/fyicenter/hyperledger-binaries/fabric-samples/fabcar\ /javascript/node_modules/fabric-network/node_modules/pkcs11js/build'
5. Create the failed directory manually and try it again:
$ sudo mkdir -p node_modules/fabric-network/node_modules/pkcs11js/build $ sudo npm install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir \ '/home/fyicenter/hyperledger-binaries/fabric-samples/fabcar\ /javascript/node_modules/fabric-network/node_modules/pkcs11js/build'
It failed again with the same directory. So "npm install" command just deleted the directory and not able to re-create it.
See next tutorial on how to resolve the issue.
Â
⇒ Reinstall npm with Node Version Manager
⇠blockfile_000000 - Blockfiles of Blockchain
⇑ WYFA (Writing Your First Application)
⇑⇑ Hyperledger Tutorials
2020-02-07, 910👍, 0💬
Popular Posts:
How to use the "set-body" Policy Statement for an Azure API service operation? The "set-body" Policy...
How to write a policy to set and get custom variables? Here is a policy that sets and gets custom va...
How to search for the first match of a regular expression using re.search()? The re.search() functio...
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...
What is Azure API Management Developer Portal? Azure API Management Developer Portal is an Azure Web...