DEV Community

KIranuknow
KIranuknow

Posted on

zsh: command not found ui5 tooling.

To solve the "zsh: command not found: ui5" error when using UI5 tools locally installed in your project's node_modules on a Mac, you can try the following approaches:

Use npx to run the UI5 CLI:

Instead of calling ui5 directly, use npx ui5. This will look for the UI5 CLI in your project's node_modules and execute it.

npx ui5 <command>

Use the full path to the UI5 CLI:
You can run the UI5 CLI by specifying its full path in the node_modules folder:

./node_modules/.bin/ui5 <command>

Add node_modules/.bin to your PATH:
You can temporarily add the node_modules/.bin directory to your PATH for the current session:

export PATH=$PATH:./node_modules/.bin

After running this command, you should be able to use ui5 directly in that terminal session.

Use npm scripts:
Define scripts in your package.json file that use the locally installed UI5 CLI:


{
  "scripts": {
    "start": "ui5 serve",
    "build": "ui5 build"
  }
}
Enter fullscreen mode Exit fullscreen mode

Then you can run these scripts using npm:

npm run start
npm run build
Enter fullscreen mode Exit fullscreen mode

Top comments (0)