'npm' is not recognized as an internal or external command, operable program or batch file in laravel 6.0

In my laravel project, I gonna try npm install. But it is not recognized in my cmd. I tried editting the environment variables and add the C:\Program Files\nodejs\ but still not works. What I gonna do so that the npm will run? It would be my first time to use npm.

1 answer

  • answered 2019-09-10 02:13 Mattx8y

    For starters, make sure the npm.cmd file is directly inside C:\Program Files\nodejs. If that file is missing, Windows will not know how to run npm. You could also try reinstalling Node.js (https://nodejs.org/en/download) which includes a copy of npm.