grunt ngtemplates任务100%cpu

咕噜任务ngtemplates运行无限期(近一个小时,没有完成)与100%的CPU利用率。 如果我评论这个任务,那么构build完成。 然后在ngtemplates中创build任务,并在另一台机器上完成OK。 任何想法/线索都非常感谢。

节点版本:0.10.29 grunt-cli:v0.1.13 grunt:v0.4.5

ngtemplates: { app: { cwd: '<%= yeoman.app %>', src: ['views/{,*/}*.html', 'views/inbox/{,*/}*.html' , 'scripts/directives/*.html'], dest: 'scripts/templates.js', options: { usemin: 'scripts/scripts.js', // <~~ This came from the <!-- build:js --> block htmlmin: { collapseBooleanAttributes: true, collapseWhitespace: true, removeAttributeQuotes: true, removeComments: true, // Only if you don't use comment directives! removeEmptyAttributes: true, removeRedundantAttributes: true, removeScriptTypeAttributes: true, removeStyleLinkTypeAttributes: true } } } } 

非常感谢,

我有同样的问题,我真的不知道,但是应该通过从“node_modules / grunt-angular-templates / task / lib / compiler.js”中删除.map (this.minify)

当我用grunt运行我的构build时,我遇到了类似的问题,并且ngtemplates任务不能完成。

我可以确认上面的注释掉“node_modules / grunt-angular-templates / task / lib / compiler.js”的第73行的答案确实允许任务完成。 但是,这不太可能是问题(如果您评论该行,则会损失文件的缩小比例)。

对于我来说,我的HTML文件中有一个HTML语法错误。 我通过w3的HTMLvalidation器运行我的文件发现了这一点。 修复语法错误之后,ngtemplates任务完成了。

使用@ isidro-martinez解决scheme,您可能会发现真正的问题。 我的问题是我的JS没有检测到的语法错误。 我已经能够find它感谢临时删除在previouse评论线:

我有同样的问题,我真的不知道,但是应该通过从“node_modules / grunt-angular-templates / task / lib / compiler.js”中删除73.map(this.minify)