Error while installing appium in macbook via terminal

Hello Everyone, I was trying to install appium via terminal in Macbook but getting below error

Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/202198-45777-9gh34q.5sdsm’
(Use node --trace-warnings ... to show where the warning was created)
(node:45777) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see (rejection id: 1)
(node:45777) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[20:00:34] Error installing Chromedriver: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver’
[20:00:34] Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver’
[20:00:34] Downloading Chromedriver can be skipped by using the ‘–chromedriver-skip-install’ flag or setting the ‘APPIUM_SKIP_CHROMEDRIVER_INSTALL’ environment variable.
npm ERR! errno 1
npm ERR! appium-chromedriver@4.27.3 postinstall: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@4.27.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/urves.b/.npm/_logs/2021-10-08T14_30_36_000Z-debug.log

Kindly help


Please try this suggestion: