如何在laravel 5.4中安装npm? [英] How can I install npm in laravel 5.4?

查看:354
本文介绍了如何在laravel 5.4中安装npm?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在命令模式下使用此命令时:

When I use this command in command mode:

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

我收到此错误:

'npm'不被识别为内部或外部命令,可操作 程序或批处理文件.

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

我该如何解决?

推荐答案

首先,我假设您是Windows用户.在这种情况下,您需要从官方网站下载并安装NPM和NodeJS.安装时,请勿取消选择添加到PATH变量"点. NPM必须添加到PATH变量中,这一点很重要,这样它才是全局可用的.

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)

这篇关于如何在laravel 5.4中安装npm?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆