Open spiliti opened 2 years ago
Hi @spiliti,
It looks like you are using Node v6.17.1. The Registry CLI needs a minimum of Node 8 because it uses async-await. However, using the latest version of Node (v16.13.0) is recommended.
From the logs, I understand you are using NVM to manage NodeJS versions. Here is the command you can run to switch to the latest version:
nvm use lts
Let me know if you need any help.
Registry Setup
Thanks. Now when I try to initialize a registry (/example$ registry init) I get the following feedback:
✔ All necessary tools installed!
✔ Enter the name of the registry · Example ✔ Enter the name of the Keycloak realm to create · sunbird-rc ✔ Enter the ID to assign to the admin client in Keycloak · admin-api ✔ Enter the ID to assign to the frontend client in Keycloak · registry-frontend ✔ Enter a username for the admin account in Keycloak · admin ✔ Enter a password for the admin account in Keycloak · admin ✔ Enter the path to a directory containing entity schemas · use-example-config ✔ Enter the path to a file containing consent configuration · use-example-config
✔ Successfully copied over necessary files ✖ An unexpected error occurred while starting the registry: Command failed with exit code 125: docker compose up -d
// Answering in #164
What is the bug related to?
Registry CLI
What went wrong?
When I ran 'registry help', I get the following error:
/home/shuller/.nvm/versions/node/v6.17.1/lib/node_modules/registry-cli/out/src/cli.js:14 async function run(argv) { ^^^^^^^^
SyntaxError: Unexpected token function at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:549:28) at Object.Module._extensions..js (module.js:586:10) at Module.load (module.js:494:32) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.require (module.js:504:17) at require (internal/module.js:20:19) at Object. (/home/shuller/.nvm/versions/node/v6.17.1/lib/node_modules/registry-cli/bin/registry:13:2)
What did you expect to see?
I should have seen commands to use with the registry
Additional Context
No response
Relevant logs/output
No response