Hello! I was working through this tutorial about ComposeDB and I’m getting an error when running
composedb did:generate-private-key
bash: composedb: command not found
I’ve gone through the install steps twice, and tried restarting my terminal and running again. You can see the package.json and package-lock.json file here
I’m seeing this error on a package which seems to want me to downgrade my vesion of node.
npm install --location=global @composedb/cli@^0.3.0
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'nist-weierstrauss@1.5.1',
npm WARN EBADENGINE required: { node: '>=14.06' },
npm WARN EBADENGINE current: { node: 'v16.14.2', npm: '8.5.0' }
npm WARN EBADENGINE }
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
added 438 packages, and audited 439 packages in 9s
70 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
@jpvajda from the logs you’re showing it seems the installation was successful, no?
I don’t know what can be the cause of your issue but it most likely has to do with your local node/npm setup, maybe not having the binaries lookup paths correctly set?
So I was able to solve it, at least the point where I got the initial error. It was some overside/inexperience on my side.
Because the command listed here always returned zsh: command not found: composedb, I assumed that this happened because during the installation process I got this error, no matter if I switched node or npm package:
My mistake here was that I literally copy => paste the command that references the composedb lib because somehow in my mind I associated it with like a shell program. As soon as I added npm/yarn upfront it worked
Thanks however for the quick and active responses to the thread from the community
For whoever might have a similar issue, I ended up installing the cli as a devDependency instead of the documented pnpm add -g @composedb/cli@^0.3.0 I do pnpm add -D @composedb/cli@^0.3.0. Then, within my package.json, I add a pnpm script like the following:
Based on some of the comments above about the documentation commands just being incorrect I was able to fix my issue where I was getting this error after running composedb did:generate-private-key
Unknown command: "composedb"
111
instead of running npm install --location=global @composedb/cli@^0.3.0 which what was in the CLI documentation I just ran npm install -g @composedb/cli@^0.3.0 and then composedb did:generate-private-key