Hey, I feel anyone can experience such bug with fresh install Ubuntu 16.04 and Laravel 5.5 for your local environment.
So, if you're stumbled with such errors like when you try to use npm run dev
Cannot find module cross-env
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
Make sure you have the latest version of node.js and npm installed
Very often it means that you have an old version of your nodejs, so when you install it as apt-get install nodejs, you will install and old LTS version 4.2.6 that too old. To fix it, you just need to update your Nodejs and everything will work seamlessly. How to do it? Follow the next steps.