How can I pass npm install && npm run dev in Lavavel?

Just now I try to pass npm install & npm run dev, every time I happen error in command.
Then I did these process in my command ever.

1.composer require laravel/ui “^2.0”

2.php artisan ui vue –auth

3.npm install

4.npm run dev

I can pass command till 2.
Error happen 3,4 in process.
Like this
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/@popperjs%2fcore reason: Invalid response body while trying to fetch https://registry.npmjs.org/@popperjs%2fcore: EACCES: permission denied, link ‘/Users/–/.npm/_cacache/tmp/fbd35d79’ -> ‘/Users/–/.npm/_cacache/content-v2/sha512/6d/0f/b6771994954828c596048ebeb4382c9b4197afdf11e4753b4305236b7c2d9c90e5229dd60f33a8aafb13b3a63f7a0036850b230cb3837322870ed4af555c’
What point should I fix in command?

Please give me advice.

I try to this command.

1.sudo npm update npm -g

2.npm update

Finally it happened error.