Node version 7.10.0
npm installed
Ubuntu Subsystem on Windows 10
I try to install testrpc and truffle. When I install truffle via
sudo npm install -g truffle
I always get the following error:
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master https://github.com/debris/bignumber.js.git /home/xxx/.npm/_cacache/tmp/git-clone-f9c59612
npm ERR! /home/xxx/.npm/_cacache/tmp/git-clone-f9c59612/.git: Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /home/xxx/.npm/_logs/2017-06-10T08_24_33_791Z-debug.log
Adding --unsafe-perm does also not help.
When installing testrpc via
sudo npm install -g ethereumjs-testrpc
the installation seems to work but when I run testrpc I get
/usr/lib/node_modules/ethereumjs-testrpc/node_modules/solc/soljson.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](
Error: Cannot find module './build/Release/scrypt'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/ethereumjs-testrpc/node_modules/scrypt/index.js:3:20)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
Why these errors and what can I do?
Thanks!
Edit:
the TestRPC issue could be solved via
chmod -R 777
on
/usr/lib/node_modules