Topic: MDB-CLI | 'mdb' is not recognized as an internal or external command, operable program or batch file

3li7u free asked 3 years ago


Hi every bodyI'd like to ask your help about mdb-cliI am typing the command $npm install -g mdb-cli and it works goodBut later on it tells me that $mdb ANY is not presentI attached a picture to you to clarify the matterPlease help, and you are very appreciative of meenter image description here


UPDATE

After Sebastian's suggestion I run this command:

>"C:\Users\Ali Alhussein\AppData\Roaming\npm\mdb"

and this is the result:

    Microsoft Windows [Version 10.0.19041.928]
(c) Microsoft Corporation. All rights reserved.

C:\Windows\system32>"C:\Users\Ali Alhussein\AppData\Roaming\npm\mdb"

Usage: mdb [entity] [command] [arg] [flags]

Command line interface for MDB environment.

Entities:
┌─────────┬─────────────┬────────────────────────────────────────────────────────────┐
│ (index) │   Entity    │                        Description                         │
├─────────┼─────────────┼────────────────────────────────────────────────────────────┤
│    0    │  'starter'  │ 'Manage all kinds of starter projects: frontend & backend' │
│    1    │  'backend'  │                 'Manage backend projects'                  │
│    2    │ 'wordpress' │                'Manage WordPress projects'                 │
│    3    │ 'frontend'  │                 'Manage frontend projects'                 │
│    4    │   'blank'   │            'Manage custom (frontend) projects'             │
│    5    │ 'database'  │                     'Manage databases'                     │
│    6    │   'repo'    │                 'Manage GitLab repository'                 │
│    7    │  'config'   │               'Manage project configuration'               │
│    8    │   'order'   │                  'Manage created orders'                   │
│    9    │    'app'    │                    'Manage MDB CLI app'                    │
│   10    │   'user'    │                       'Manage users'                       │
└─────────┴─────────────┴────────────────────────────────────────────────────────────┘

Commands:
┌─────────┬────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ (index) │  Command   │                                                             Description                                                              │
├─────────┼────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│    0    │   'help'   │                                  'Display this help info. Use with entities: <none>, app (default)'                                  │
│    1    │  'update'  │                         'Update MDB CLI app to the latest version. Use with entities: <none>, app (default)'                         │
│    2    │ 'version'  │                       'Check currently installed version of MDB CLI. Use with entities: <none>, app (default)'                       │
│    3    │ 'register' │                                'Create a new MDB account. Use with entities: <none>, user (default)'                                 │
│    4    │  'login'   │                               'Log in to your MDB account. Use with entities: <none>, user (default)'                                │
│    5    │  'logout'  │                                  'Log out from MDB CLI. Use with entities: <none>, user (default)'                                   │
│    6    │    'ls'    │          'List entity content. Use with entities: <none>, starter, frontend (default), backend, database, wordpress, order'          │
│    7    │   'init'   │ 'Create something of entity type. Use with entities: <none>, starter, blank, frontend (default), backend, wordpress, database, repo' │
│    8    │ 'publish'  │                         'Publish project. Use with entities: <none>, frontend (default), backend, wordpress'                         │
│    9    │   'get'    │                    'Download a project to the current directory. Use with entities: backend, frontend, wordpress'                    │
│   10    │   'info'   │                                  'Display info about entity. Use with entities: backend, database'                                   │
│   11    │  'delete'  │                       'Completely delete an entity. Use with entities: backend, database, frontend, wordpress'                       │
│   12    │   'kill'   │                                             'Stop a project. Use with entities: backend'                                             │
│   13    │ 'destroy'  │                                                          'Alias for `kill`'                                                          │
│   14    │   'logs'   │                                       'Display logs of a project. Use with entities: backend'                                        │
│   15    │  'rename'  │                          'Change the project name locally and on public server. Use with entities: <none>'                           │
└─────────┴────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Aliases:
┌─────────┬────────────────┬───────────────────────────────┐
│ (index) │    Command     │          Description          │
├─────────┼────────────────┼───────────────────────────────┤
│    0    │ 'mdb starters' │ 'The same as: mdb starter ls' │
│    1    │  'mdb orders'  │  'The same as: mdb order ls'  │
└─────────┴────────────────┴───────────────────────────────┘

Visit https://mdbootstrap.com/docs/standard/cli/reference/ for full command reference.

C:\Windows\system32>

Sebastian Kaczmarek staff answered 3 years ago


It's not uncommon for that to happen on Windows. There are a few things you should try:

  1. Try closing and opening your terminal window again
  2. Try running the mdb command directly and see if it works that way:

    $ "C:\Users\Ali Alhussein\AppData\Roaming\npm\mdb"

  3. Try adding this path to your PATH system variable: ;C:\Users\Ali Alhussein\AppData\Roaming\npm. In order to do that you need to go to Control Panel | System | Advanced System Settings | Environment Variables and edit your PATH value by adding the mentioned path.
Let me know if that helps you.


3li7u free commented 3 years ago

First of all, let me thank you for your effort I have done all 3 steps in total did not work and nothing changed mdb still not recognized


Sebastian Kaczmarek staff commented 3 years ago

That's weird, it should definitely work after adding ;C:\Users\Ali Alhussein\AppData\Roaming\npm to the Path variable. Are you 100% sure you have added this exact path? You should not add the mdb part at the end, you need to provide only the parent directory.

The result of the command that you posted (I moved it to the question) is expected - you saw the Help with instructions how to use MDB CLI. It means that the installation is correct and you need to tell your OS where to find the mdb command (it doesn't always happen but if it does, it happens on Windows for some reason)


3li7u free commented 3 years ago

That's right, I added mdb to the path variable It works now Let me express my sincere thanks and gratitude to you



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB CLI / MDB GO
  • MDB Version: 3.2.3
  • Device: computer
  • Browser: chrome
  • OS: windows 10
  • Provided sample code: Yes
  • Provided link: No