简体   繁体   English

npm Grunt加载,但随后无法识别grunt命令

[英]npm Grunt loads, but then grunt command unrecognized

I have used grunt on this computer before for other projects (4 months ago), and recently wanted to use grunt for a new project. 之前,我曾在这台计算机上使用grunt进行其他项目(4个月前),最近我想将grunt用于新项目。 I loaded grunt globally and then locally, but after that typing in $ grunt -v says grunt is not recognized as if it is not loaded, or perhaps the path is wrong? 我先全局加载grunt,然后在本地加载grunt,但是在输入$ grunt后,-v表示grunt无法识别为好像没有加载,或者路径错误吗? anyone got any ideas? 任何人有任何想法吗? 在此处输入图片说明

Update: 5/16/2016, I tried the below suggestion and loaded casper-cli globally and locally, and the grunt command still fails. 更新:2016年5月16日,我尝试了以下建议,并在本地和本地加载了casper-cli,而grunt命令仍然失败。 Additionally, I tried another command 'casperjs' and that one is also failing even though that has worked perfectly for the last year or so. 另外,我尝试了另一个命令“ casperjs”,即使在过去一年左右的时间里,它也运行良好,但该命令也失败了。 It appears all of my commands are not working anymore, what could possibly cause that? 看来我所有的命令都不再起作用,可能是什么原因导致的?

在此处输入图片说明

您必须全局安装grunt-cli才能在控制台中使用grunt: npm install grunt-cli -g

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM