How can I install npm in laravel 5.4?

廉价感情. 提交于 2019-12-25 18:19:11

问题


When I use this command in command mode:

D:\xampp\htdocs\profileApp>npm run dev

I get this error:

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

How can I solve this?


回答1:


First of all, I assume you are a Windows user. In this case, you need to download and install NPM together with NodeJS from the official website. When installing, do not unselect the "Add to PATH variables" point. It's important that NPM is added to your PATH variables, so it's globally available.

After installing, simply restart your terminal(s)




回答2:


Download and install Gitbash it will be used to run such commands. `

Git bash will help you emulate bash commands. Read this article with how to use git and npm on windows with Git Bash




回答3:


First you need to install Node which comes with NPM bundled in so that it would be recognizable by Windows CMD you can download the latest version from the Official Website.

Optional : If you are willing to work on open source projects consider installing Git for windows



来源:https://stackoverflow.com/questions/44249800/how-can-i-install-npm-in-laravel-5-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!