title: Laravel "npm run dev" throws "const envVars = {...process.env}" Unexpected token issue
body: <p>I am working on a Laravel project. I have installed the Laravel project from scratch. My laptop's OS is Windows 10.
  I have installed the npm install. Then I run &quot;npm run dev&quot;. Then I got the following error.</p>
  <pre><code>&gt; @ development C:\Users\Acer\Desktop\LaravelProjects\PatheinDirectory
  &gt; cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
  
  C:\Users\Acer\Desktop\LaravelProjects\PatheinDirectory\node_modules\cross-env\src\index.js:87
    const envVars = {...process.env}
                     ^^^
  
  SyntaxError: Unexpected token ...
      at createScript (vm.js:74:10)
      at Object.runInThisContext (vm.js:116:10)
      at Module._compile (module.js:533:28)
      at Object.Module._extensions..js (module.js:580:10)
      at Module.load (module.js:503:32)
      at tryModuleLoad (module.js:466:12)
      at Function.Module._load (module.js:458:3)
      at Module.require (module.js:513:17)
      at require (internal/module.js:11:18)
      at Object.&lt;anonymous&gt; (C:\Users\Acer\Desktop\LaravelProjects\PatheinDirectory\node_modules\cross-env\src\bin\cross-env.js:3:18)
  npm ERR! code ELIFECYCLE
  npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the @ development 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!     C:\Users\Acer\AppData\Roaming\npm-cache\_logs\2020-08-16T14_19_31_375Z-debug.log
  </code></pre>
  <p>I tried deleting the node_modules folder and then tried running the npm run dev again. It did not work.</p>
  <p>I also tried running the following command after deleting the node_modules folder too.</p>
  <pre><code>npm install --global cross-env
  </code></pre>
  <p>It did not work either. How can I fix it?</p>