Yeoman错误使用“grunt”命令启动项目

时间:2015-07-01 16:02:40

标签: gruntjs yeoman yeoman-generator-angular

我正在关注yeoman教程http://yeoman.io/codelab/prepare-production.html,一切正常,直到我尝试使用“grunt”命令启动我的项目,然后我收到以下错误:

Running "autoprefixer:dist" (autoprefixer) taskAutoprefixer's process() method is deprecated and will removed in next major release. Use postcss([autoprefixer]).process() insteadFile .tmp/styles/main.css created.
jit-grunt: Plugin for the "ngtemplates" task not found.If you have installed the plugin already, please setting the static mapping.See https://github.com/shootaroo/jit-grunt#static-mappings
Warning: Task "ngtemplates" failed. Use --force to continue.
Aborted due to warnings.

我使用Linux Mint 17

2 个答案:

答案 0 :(得分:2)

A workaround发布在generator-angular github上。尝试修改Gruntfile.js以使jit-grunt块看起来像这样:

//InvoiceLine[./Productnbr='0103']/InsertionDate

答案 1 :(得分:1)

这是grunt-autoprefixer已弃用的问题。

我猜,您安装了旧版本的生成器角度和当前版本的grunt,该教程使用以下命令编写。

npm install --global yo bower grunt-cli
npm install --global generator-angular@0.11.1

最好安装当前版本的generator-angular。只需运行它并重新开始。

npm install -g generator-angular
相关问题