js-ceramic icon indicating copy to clipboard operation
js-ceramic copied to clipboard

Ceramic CLI issues on Ubuntu

Open simonovic86 opened this issue 4 years ago • 5 comments

  • test and fix issues with CLI in Ubuntu env

simonovic86 avatar Sep 14 '20 09:09 simonovic86

has this been resolved? npm installing the cli blows chuncks still

DB-

DarkBlaez avatar Apr 11 '21 02:04 DarkBlaez

@DarkBlaez Can you please elaborate. What is the issue you are seeing?

oed avatar Apr 11 '21 09:04 oed

Sorry I should have added all the log and some background. So everything thus far except the CLI installed. I am testing this on an RPI 4, 4G RAM 256G SD. I have a similar setup for Tezos and IPFS nodes aside from my public gateway IPFS nodes across various regions. My goal is to test Ceramic and see if my use case fits. However, doing it on a few RPIs rather than my Intel multi-host Kubernetes cluster.

I have node version v14.16.1, npm v6.14.2 ARM64 Ubuntu 20.04.2

The CLI seems to want access to directories that are permissioned at a higher level than user. as such a simple sudo will address this with

sudo npm install -g @ceramicnetwork/cli

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)

> [email protected] preinstall /usr/lib/node_modules/@ceramicnetwork/cli/node_modules/cbor
> node .checkVersion

/usr/bin/ceramic -> /usr/lib/node_modules/@ceramicnetwork/cli/bin/ceramic.js

> [email protected] install /usr/lib/node_modules/@ceramicnetwork/cli/node_modules/iso-constants
> node build.js > index.browser.js

sh: 1: cannot create index.browser.js: Permission denied
npm WARN [email protected] requires a peer of ipfs-repo@^6.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of electron-webrtc@^0.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of wrtc@^0.4.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of prom-client@>= 10 <= 12 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] install: `node build.js > index.browser.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] 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!     /root/.npm/_logs/2021-04-11T16_35_08_862Z-debug.log

I do have prom-client installed, v12.0.0

So not sure why I am getting all these errors. It may be possible that the npm package for installing the CLI has made some assumptions and not included additional references taking in to consideration a fresh install. Which is why all my DevOps builds are fresh within CI , but assume the team does this already.

Thoughts?

Thanks DB-

DarkBlaez avatar Apr 11 '21 16:04 DarkBlaez

Seems we need to document the dependencies for the CLI, as looking at the warnings the dependencies may not be included with the npm install on the CLI. This then begs the question within a normal DevOps the builds are fresh, the installs are fresh so that all dependencies and criteria are met for a package without error. This is a fresh install and the errors pop up.

-DB

DarkBlaez avatar Apr 11 '21 19:04 DarkBlaez

It's a permissions thing, the recommended way to install node is with nvm. However, changing perms on a root owned node_modules addresses this issue.

-DB

DarkBlaez avatar Apr 11 '21 22:04 DarkBlaez