G运行t - 无法 运行 服务:"Warning: Task "autoprefixer“未找到”

Grunt - Unable to run serve: "Warning: Task "autoprefixer" not found"

我正在按照 yeoman 网页上的教程进行操作,但现在卡在第 5 步:http://yeoman.io/codelab/preview-inbrowser.html

第一次grunt serve后,出现这个错误"Fatal error: Unable to find local grunt."

我意识到 g运行t 还没有在我的项目本地安装然后我 运行 sudo npm install grunt --save-dev

现在我可以 运行 grunt serve,但它给了我一个警告,当然我仍然无法启动我的服务器。下面是我的截图:

我正在使用 Ubuntu 14.04 并且还尝试了 运行ning npm installbower install

我想出了解决办法。对于一些也遇到过这个的人,我在使用 sudo npm install --global yo bower grunt-cli 时出错了。我应该改为遵循以下步骤:https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md

之后,如果您仍然收到“警告:ENOENT,没有这样的文件或目录**/app/bower。json”,请检查: https://github.com/stephenplusplus/grunt-wiredep/issues/100