Closed dipeshsingh253 closed 1 year ago
@dipeshsingh253 hi, thanks for reporting. I'm moving this to the Leon CLI repository. @Divlo any idea regarding this issue?
Hey, thanks for your report! @dipeshsingh253
Top-level await
is supported since Node.js v14.8.0 (ref: https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#top-level-await).
The PATH
environment variable is not the same if the command is run with sudo
(ref: https://stackoverflow.com/questions/257616/why-does-sudo-change-the-path), also you should not run the Leon CLI with sudo
.
I don't think that sudo node -v
and node -v
give you the same output. You can also try /usr/bin/env node -v
and sudo /usr/bin/env node -v
.
Make sure you are using the right Node.js version or open an issue on Node.js repo.
Closing as this a non issue for leon-cli
.
Please reopen if you think this is a mistake.
Specs
Expected Behavior:
Expected to installed properly and run
Actual Behavior:
Unable to install
How Do We Reproduce?
First I though this is because of older versions of node and npm but I am using latest version for them. In sort my error and system details are availible in image given below.
Extra (like a sample repo to reproduce the issue, etc.)
sudo leon create birth [sudo] password for dipesh253: file:///usr/local/lib/nodemodules/@leon-ai/cli/build/index.js:13 await cli.runExit(arguments, Cli.defaultContext); ^^^^^
SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) at async link (internal/modules/esm/module_job.js:42:21)
Thanks for Your Help.