Laravel 8 fresh installation with livewire npm install && npm run dev error

Need to update node version.

Ubuntu (Linux)

Run this command to update node

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

after this close current terminal and open new one and run this command in PROJECT DIR

sudo npm install 
npm run dev

Just try to upgrade your current node version

Current stable 15.5.1

you can upgrade it using brew in Mac-OS case:

brew install nvm
nvm install 15
nvm use 15