Today I tried to run npm run dev command for Laravel with vite.js and i got this error:

Layout is not recognized as an internal or external command

Solution:

My problem. I had my folder called "Tutorial for commands & terminal"

Solution: change my folder to "tutorial-commands-terminal"

Fix: Remove spaces and special chars from your folder or directory name