无法将Bower识别为内部或外部命令 [英] bower is not recognised as an internal or external command
问题描述
我已经成功安装了nodejs和express框架,但是我通过以下方式下载了Bower
I have successfully installed nodejs, and express framework, however I downloaded bower via
npm install -g bower
成功运行.
但是,每当我尝试使用Bower安装某些东西时,都会收到错误消息
However whenever I try to install something with bower I get the error message
bower is not recognised as an internal or external command
当我在计算机上搜索bower或bower.exe时,找不到它.
when I search my computer for bower or a bower.exe I cannot locate it.
推荐答案
我也正在使用Windows 7,并且也存在此问题.
I am using Windows 7 as well and had this problem too.
在我执行了斯科特·马奇特的答案中概述的步骤之后,鲍尔开始工作了.
After I took the steps outlined in Scott Marchant's answer, bower worked.
找到npm全局二进制文件的位置:npm config获取前缀.此路径可能类似于C:\ Users \ username \ AppData \ Roaming \ npm. 将步骤1的路径添加到您的路径中.
Find the location of your npm global binaries: npm config get prefix. This path may look something like C:\Users\username\AppData\Roaming\npm. Add the path from step 1 to your Path.
打开Windows控制面板,搜索环境,然后单击为您的帐户编辑环境变量,或单击编辑系统环境变量".
Open the Windows Control Panel, search for environment, then click on either edit environment variables for your account, or Edit the system environment variables`.
找到名为Path或PATH的变量,或者创建一个不存在的变量.
Find the variable named Path or PATH, or create one if it doesn't exist.
在此处粘贴第1步的路径(;定界).
Paste the path from step 1 here (; delimited).
您可能需要重新启动命令提示符窗口.
You may need to restart your command prompt window.
您现在应该可以输入Bower命令.
You should now be able to enter bower commands.
这篇关于无法将Bower识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!