After fresh install, I am:running composer command to install laravel installer, but it didnt work, the process stuck, the lines only showed "changing directory to bla bla" . then I install composer from the official website, add the PATH in env variables, running the command again and it worked. the same occurs with npm, when i am using the npm from laragon i cant use "npm install". the console displayed error. then I install the ones from Node official websites, adding to PATH, and it did work normally.
Why was that? Is there any solution?