Unable to install Node-Red Dashboard

Hello Just starting out and following tutorials on installing node red dashboard.

I went to Manage Palettes > Install > Node Red dashboard

MacBook:.node-red cube$ npm i node-red-dashboard
Unhandled rejection Error: EACCES: permission denied, mkdir '/Users/cube/.npm/_cacache/index-v5/45/fb'tallable status

Unhandled rejection Error: EACCES: permission denied, mkdir '/Users/cube/.npm/_cacache/index-v5/21/11'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/cube/.npm/_logs/2019-07-25T02_40_46_494Z-debug.log

Debug log shows

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'i',
1 verbose cli   'node-red-dashboard' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose npm-session 06e09d876b16a901
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/node-red-dashboard 161ms (from cache)
8 silly pacote tag manifest for node-red-dashboard@latest fetched in 181ms
9 timing stage:loadCurrentTree Completed in 222ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule node-red-dashboard@2.15.5 checking installable status
17 http fetch GET 304 https://registry.npmjs.org/serve-static 67ms (from cache)
18 silly fetchPackageMetaData error for serve-static@^1.14.1 EACCES: permission denied, mkdir '/Users/cube/.npm/_cacache/index-v5/47/89'
19 timing npm Completed in 1169ms
20 error cb() never called!
21 error This is an error with npm itself. Please report this error at:
22 error <https://npm.community>

I tried reinstalling NPM but that didn't work. Could anyone help guide me in the right path?

For some reason, the installer cannot write to the locations shown.

This is possibly due to you having used SUDO with a node-red npm install previously?

Try deleting /Users/cube/.npm/_cacache, npm should recreate it.