DEV Community

KIranuknow
KIranuknow

Posted on

1

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

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay