无法使用Grunt编译Bootstrap 3 LESS主文件(bootstrap.less)?

我无法将“主” bootstrap.less编译为'<%= pkg.name %>.css' 。 我得到这个错误运行grunt less

 Running "less:dist" (less) task >> ParseError: Syntax Error on line 643 in bower_components\bootstrap\less\mixins.less:643:25 >> padding-right: (@grid-gutter-width / 2); >> &:extend(.clearfix all); >> } Warning: Error compiling LESS. Use --force to continue. Aborted due to warnings. 

我的configurationless任务是相当简单的:

 less: { options: { strictMath: true }, dist: { files: { 'dist/assets/css/<%= pkg.name %>.css': [ '<%= bootstrap_less %>/bootstrap.less', 'src/assets/less/style.less' ] } } }, // Arbitrary properties used in task configuration templates. bower_components: 'bower_components', bootstrap_less: '<%= bower_components %>/bootstrap/less' 

mixins.less错误行(不以任何方式修改):

 // Centered container element .container-fixed() { margin-right: auto; margin-left: auto; padding-left: (@grid-gutter-width / 2); padding-right: (@grid-gutter-width / 2); &:extend(.clearfix all); } 

也请不要我是新来的咕噜,也许我失去了一些东西。

也许你的版本less过时了? :extend()是Less的新特性。