I’ve used ember on earlier versions of Ubuntu. It seems to install OK with sudo npm install -g ember-cli. But trying to run any ember command gives this error:
/usr/local/lib/node_modules/ember-cli/lib/models/project.js:592
return this.addons.find((addon) => addon.pkg?.name === name);
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/usr/local/lib/node_modules/ember-cli/lib/utilities/get-config.js:4:15)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
So updating node from v12 to 16 got me past the error I posted, but gave me a new error. I saw that I need node v18 for ember 5.30, so I reverted the machine and installed node v18. Then I tried installing ember sudo npm install -g ember-cli, and the ember install itself failed, as npm was missing modules.
FWIW a tool like nvm, asdf or volta can help manage node versions and installs them in a more isolated way so you don’t need to run with sudo or have any special permissions