ember.js - 第1行的ember build Parse错误:{{#each messages as | message |}}

ember.js - 第1行的ember build Parse错误:{{#each messages as | message |}},第1张

您好我试图从ember 1.8.1更新我的ember cli项目 - > 1.9.1&车把1.3.0 - >但是,当我使用命令ember build

时,我现在收到以下错误
Build failed.
File: ui/templates/components/ember-notify.hbs
Parse error on line 1:
{{#each messages as |message|}}  {{#vie
--------------------^
Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'STRING', 'NUMBER', 'BOOLEAN', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'EQUALS', 'DATA', 'SEP', got 'INVALID'
Error: Parse error on line 1:
{{#each messages as |message|}}  {{#vie
--------------------^
Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'STRING', 'NUMBER', 'BOOLEAN', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'EQUALS', 'DATA', 'SEP', got 'INVALID'
    at Object.parseError (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:106:11)
    at Object.parse (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:158:22)
    at HandlebarsEnvironment.parse (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js:18:17)
    at TemplateCompiler.EmberHandlebars.precompile (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/ember-template-compiler/vendor/ember-template-compiler.js:239:24)
    at TemplateCompiler.processString (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/index.js:58:38)
    at TemplateCompiler.Filter.processFile (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/broccoli-filter/index.js:136:31)

的package.json

{
  "name": "ui",
  "version": "0.0.0",
  "description": "Small description for ui goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "start": "ember server",
    "build": "ember build",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "bower": "^1.3.12",
    "broccoli-asset-rev": "^2.0.0",
    "broccoli-merge-trees": "^0.2.1",
    "broccoli-static-compiler": "^0.2.1",
    "ember-cli": "^0.1.11",
    "ember-cli-babel": "^5.0.0",
    "ember-cli-content-security-policy": "0.3.0",
    "ember-cli-cookie": "^0.1.0",
    "ember-cli-dependency-checker": "0.0.7",
    "ember-cli-htmlbars": "^0.6.0",
    "ember-cli-ic-ajax": "0.1.1",
    "ember-cli-inject-live-reload": "^1.3.0",
    "ember-cli-less": "^1.1.1",
    "ember-cli-qunit": "0.3.1",
    "ember-cli-simple-auth": "^0.7.3",
    "ember-cli-simple-auth-oauth2": "^0.7.2",
    "ember-cli-simple-auth-torii": "^0.8.0-beta.1",
    "ember-cli-tooltipster": "0.0.6",
    "ember-data": "1.0.0-beta.15",
    "ember-export-application-global": "^1.0.0",
    "ember-idx-button": "^0.1.3",
    "ember-idx-forms": "^0.5.1",
    "ember-mousetrap": "0.2.0",
    "ember-notify": "^3.1.4",
    "ember-template-compiler": "^1.9.0-alpha",
    "express": "^4.8.5",
    "glob": "^4.0.5",
    "torii": "^0.3.3"
  }
}

bower.json

{
  "name": "ui",
  "dependencies": {
    "handlebars": "~2.0.0",
    "jquery": "^1.11.1",
    "ember": "1.9.1",
    "ember-data": "1.0.0-beta.15",
    "ember-resolver": "~0.1.11",
    "loader.js": "ember-cli/loader.js#1.0.1",
    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
    "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
    "ember-load-initializers": "ember-cli/ember-load-initializers#0.0.2",
    "ember-qunit": "0.1.8",
    "ember-qunit-notifications": "0.0.5",
    "qunit": "~1.17.1",
    "bootstrap": "~3.3.4",
    "ember-addons.bs_for_ember": "~0.7.0",
    "slick.js": "~1.4.0",
    "jquery-mousewheel": "~3.1.12",
    "videojs-youtube": "~1.2.8",
    "tooltipster": "~3.3.0",
    "ember-mousetrap": "~0.2.0",
    "ember-validations": "2.0.0-alpha.3",
    "rsvp": "~3.0.18",
    "bootswatch": "v3.3.4 1",
    "ember-simple-auth": "~0.7.3",
    "progressbar.js": "~0.8.1",
    "selectivity": "~1.1.0",
    "select2": "~4.0.0",
    "select2-bootstrap3-css": "~1.4.6",
    "jquery-mentions": "~1.0.1",
    "jquery-autocomplete": "~1.1.1",
    "owl.carousel": "2.0.0-beta.2.4"
  }
}

最佳答案:

1 个答案:

答案 0 :(得分:2)

我认为您可能正在使用旧版本的HTMLBars和/或Ember CLI。您应该从0.2.7升级到Ember CLI ^0.1.11(这是您在这里使用的奇怪,因为从每个版本的Ember CLI升级需要采取一些步骤)和ember-cli-htmlbars到{{ 1}}。

以下是最新版本的Ember和valid package.json的valid bower.json文件。

检查您当前安装的Ember CLI版本,或者请将其完全删除,然后将0.7.6package.json中的重要软件包版本更新为之前链接的有效版本。然后从Ember CLI releases site(清理缓存等)开始设置步骤和项目更新步骤。

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复