Can't install the OpenZeppelin Starter Kits

Hello,

Pretty overwhelmed with all this dev stuff but i want to try and crack it due to new downtime…

I am trying to install the starter kit as it seems like a good place to start. However i am running into the below problem. I have tried resolving/ looking for similar bafoons that have had the same issue for the last 3 hours but I am very stuck. The issue clearly is in front of the keyboard but if anybody could help that would be grand.

running this on ubunutu
node -v
v13.11.0
npm -v
6.14.3

sudo npm install --global @openzeppelin/cli
npm WARN deprecated truffle-config@1.1.16: WARNING: This package has been renamed to @truffle/config.
npm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -2
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/web3-js/WebSocket-Node.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:

1 Like

Hi @waving_from_heights,

Welcome to the community :wave:

Glad that you are getting to try Solidity development.
Everyone was new once and not that long ago (What are your top three recommendations for a new developer in the space?)

A great way to track your progress is to keep a record of it. You could do your own version of in the forum: My Coding Journey: Beginner to Pro

From your error, it looks like you don’t have Git installed
https://git-scm.com/download/linux

I would also suggest looking to change your node version. I use node 10 daily and node 12 should work too. Using node 13 you may run into issues with ecosystem support.
You may want to look at using nvm for this to easily change node versions.

Hi @waving_from_heights,

I wanted to check if you were able to resolve?

Hi @abcoathup,

Thanks for the welcome and help.

No luck at all. I’m trying to resolve but every time i do i run into more issues. This is more of a new to linux and coding thing really as i’m having all kinds of issues with npm, i fix one and then get another.

My current issue is below. At a bit of a loss to be honest. This all feels way beyond me.

stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@openzeppelin/cli/node_modules/keccak/.node-gyp'
gyp ERR! System Linux 5.3.0-45-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/@openzeppelin/cli/node_modules/keccak
gyp ERR! node -v v13.11.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keccak@2.1.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keccak@2.1.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Keccak bindings compilation fail. Pure JS implementation will be used.

> secp256k1@3.8.0 install /usr/lib/node_modules/@openzeppelin/cli/node_modules/secp256k1
> npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."


> secp256k1@3.8.0 rebuild /usr/lib/node_modules/@openzeppelin/cli/node_modules/secp256k1
> node-gyp rebuild

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/m/.cache/node-gyp/13.11.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/@openzeppelin/cli/node_modules/secp256k1/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@openzeppelin/cli/node_modules/secp256k1/.node-gyp'
gyp ERR! System Linux 5.3.0-45-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/@openzeppelin/cli/node_modules/secp256k1
gyp ERR! node -v v13.11.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! secp256k1@3.8.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the secp256k1@3.8.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Secp256k1 bindings compilation fail. Pure JS implementation will be used.

> @web3-js/websocket@1.0.30 install /usr/lib/node_modules/@openzeppelin/cli/node_modules/@web3-js/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

sh: 1: cannot create builderror.log: Permission denied

> websocket@1.0.29 install /usr/lib/node_modules/@openzeppelin/cli/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

sh: 1: cannot create builderror.log: Permission denied

> grpc@1.24.2 install /usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for grpc@1.24.2 and node@13.11.0 (node-v79 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/src/node' 
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/m/.cache/node-gyp/13.11.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/.node-gyp'
gyp ERR! System Linux 5.3.0-45-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v79"
gyp ERR! cwd /usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc
gyp ERR! node -v v13.11.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1026:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 5.3.0-45-generic
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc
node-pre-gyp ERR! node -v v13.11.0
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/usr/lib/node_modules/@openzeppelin/cli/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.24.2 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc(at sign)1.24.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/m/.npm/_logs/2020-04-09T03_54_11_646Z-debug.log

Hi @abcoathup,

Don’t worry I’m not giving up though!

I want to start from scratch again with regards to the packages i’ve downloaded. I’ll look into doing that next i reckon and build up from there. Now to learn how to do that…!

OK So I got the starter kit to work :slight_smile:

Still getting a lot of the above errors however for whatever reason it now functions

I reinstalled Node.JS and NPM multiple times using different versions to no effect. However just now the LTS version of Node.JS worked. I’ve done nothing differently just to previsous installations, it just worked. Sorry I can’t be of more help.

Anyway I’m looking forward to getting starterd with my OZ journey :slight_smile: got quite a few projects I want to work on!

1 Like