Search code examples
phplaravelnpmlaravel-8laravel-mix

NPM gives error when using Laravel Mix node module


Laravel Mix has been installed the following way.

npm install laravel-mix@latest

But when running npm run production (happens with npm run dev too), I get the following error. I have deleted my node modules folder again and again and tried to install the laravel mix command by using the npm install laravel-mix --save command as well, same results, however.

enter image description here


Solution

  • Try installing process as a dev dependency.

    npm install --save-dev process