首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >解析模板时出现yeoman grunt构建错误

解析模板时出现yeoman grunt构建错误
EN

Stack Overflow用户
提问于 2016-01-25 03:31:43
回答 1查看 220关注 0票数 1

我使用yeoman生成器创建了webapp。在新的应用程序上,我运行了:grunt build --verbose,并且有这个错误:

代码语言:javascript
复制
Files: app/index.html -> html
Options: dest="dist"
Going through app/index.html to update the config
Looking for build script HTML comment blocks
Warning: An error occurred while processing a template (Unexpected token )). Use --force to continue.

Aborted due to warnings.

这是我的package.json

代码语言:javascript
复制
{
  "private": true,
  "devDependencies": {
    "autoprefixer": "^6.0.2",
    "babel-preset-es2015": "^6.1.18",
    "grunt": "^0.4.5",
    "grunt-babel": "^6.0.0",
    "grunt-browser-sync": "^2.1.2",
    "grunt-concurrent": "^1.0.0",
    "grunt-contrib-clean": "^0.6.0",
    "grunt-contrib-concat": "^0.5.1",
    "grunt-contrib-copy": "^0.8.0",
    "grunt-contrib-cssmin": "^0.12.2",
    "grunt-contrib-htmlmin": "^0.4.0",
    "grunt-contrib-imagemin": "^1.0.0",
    "grunt-contrib-uglify": "^0.8.0",
    "grunt-contrib-watch": "^0.6.1",
    "grunt-eslint": "^17.0.0",
    "grunt-filerev": "^2.2.0",
    "grunt-mocha": "^0.4.12",
    "grunt-newer": "^1.1.0",
    "grunt-postcss": "^0.6.0",
    "grunt-sass": "^1.0.0",
    "grunt-svgmin": "^2.0.1",
    "grunt-usemin": "^3.0.0",
    "grunt-wiredep": "^2.0.0",
    "jit-grunt": "^0.9.1",
    "time-grunt": "^1.1.0"
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "scripts": {
    "test": "grunt test"
  },
  "eslintConfig": {
    "extends": [
      "eslint:recommended"
    ],
    "env": {
      "node": true,
      "browser": true,
      "es6": true,
      "jquery": true,
      "mocha": true
    },
    "rules": {
      "quotes": [
        2,
        "single"
      ],
      "indent": [
        2,
        2
      ]
    }
  }
}

有谁可以帮我?我之前所做的只是更新到新的npm版本和yeoman。

编辑

这是index.html文件,我也尝试了非常基本的html,只有HTML头和主体标签。

代码语言:javascript
复制
<!doctype html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <title>test2</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

  </head>
  <body>

  </body>
</html>
EN

回答 1

Stack Overflow用户

发布于 2016-01-30 01:36:42

检查您的imagemin任务中是否有额外的%

请参阅:https://stackoverflow.com/a/35090387/5858382

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34980422

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档