我正在尝试 yeomen 脚手架工具。唯一的问题是我遇到了一些问题和咕噜声。我正在尝试使用 webapp 生成器组装一个简单的网站。搭建应用程序并使用grunt serve
工作完美。仅在使用时失败grunt build
它失败并显示以下消息:
Running "useminPrepare:html" (useminPrepare) task
Warning: An error occurred while processing a template (Unexpected token )). Use --force to continue.
使用武力并不能解决问题。我尝试通过删除以下行来绕过 gruntfile 中的操作html: '<%= config.app %>/index.html'
in
useminPrepare: {
options: {
dest: '<%= config.dist %>'
},
html: '<%= config.app %>/index.html'
},
它跳过了当前的问题,没有错误,但随后又发生了另一个错误
Warning: Running "imagemin:dist" (imagemin) task
Warning: An error occurred while processing a template (Unexpected token )). Use --force to continue.
我使用相同的生成器搭建了大约 12 次脚手架,没有任何改变。我也尝试过使用另一台具有相同配置的计算机而不进行任何更改。
Git、Node、npm、grunt、bower、ruby、sass 等等都是最新的。它从未在任何地方(除了错误中)声明获取 ruby 和 sass,所以我假设我也错过了一些其他重要的技术。
我在 Windows 10 上使用 powershell。尝试使用 git shell,但仍然遇到相同的错误。真的很喜欢 yeoman 所提供的。感谢任何建议/解决方案。