Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn global install: "adonis: command not found"

Installed Adonis with yarn on Ubuntu 18 (running on WSL2 VM):

pomatti@NT-03024:~/Projects/myApp$ yarn global add @adonisjs/cli
yarn global v1.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "@adonisjs/[email protected]" with binaries:
      - adonis
Done in 3.29s.

However when I try to run it, the command is not found:

pomatti@NT-03024:~/Projects/myApp$ adonis
adonis: command not found

What is odd is that my package.json commands are working properly and my app is started, but I am not able to call adonis directly in the command line (the global installation).

For example, yarn migration && adonis serve --dev --debug works.

"scripts": {
    "serve": "adonis serve",
    "migration": "adonis migration:run",
    "start": "yarn migration && yarn serve",
    "dev": "yarn migration && adonis serve --dev --debug",
    "lint": "yarn eslint"
  },
like image 554
Evandro Pomatti Avatar asked Jun 07 '26 00:06

Evandro Pomatti


1 Answers

Try to install with NPM. Command:

> npm i -g @adonisjs/cli

Official documentation

like image 91
crbast Avatar answered Jun 10 '26 18:06

crbast



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!