2

I am currently taking a laravel 8 framework class and each time I install a laravel/ui (Bootstrap 4, TALL stack, etc) I get an error after running:

npm install && npm run dev

This is fixed by running the command again the second time, without having to troubleshoot or change anything. I don't have an issue with the error but as a freshman and a curious coder, I find myself wondering about what causes the error on the first run.

Here is an image of the error that stops the command the first time.

Error Displayed during the first npm command run

Can someone please explain what is it that happens the first time the commands are executed that causes the error to stop the execution of the command.

Relcode
  • 505
  • 1
  • 6
  • 16

1 Answers1

3

Did you read the error message?

It says that it installed an additional dependency, and to run again.

That's why it works on the second time.

If you already had "resolve-url-loader": "^4.0.0" in your "devDependencies", chances are Mix wouldn't have needed the extra step.

AKX
  • 152,115
  • 15
  • 115
  • 172
  • Yes the second part is what I was looking for. I did see the error message and I do get the idea of other dependencies being required but I didn't get what was missing on the package.json file that needed installing before running mix. Thanks for pointing out "resolve-url-loader": "^4.0.0" – Relcode Dec 09 '21 at 10:46