简体   繁体   中英

Ember : Build error after installing ember-table

I am using ember version 2.3.0. I have added ember-table addon in my ember project using ember-cli,

ember install ember-table

But after adding ember-table, I am not able to build my ember project as it is throwing following error in console,

在此处输入图片说明

When I try to access my project in browser, it is showing following error message.

Build error

web-ui/templates/body-table-container.hbs (in C:\xampp\htdocs\stack-ui\spoke\web-ui\tmp\template_compiler-input_base_path-PohadWgB.tmp\0)

Assertion Failed: Using `{{view}}` or any path based on it ('web-ui/templates/body-table-container.hbs' @ L5:C8) has been removed in Ember 2.0

Error: Assertion Failed: Using `{{view}}` or any path based on it ('web-ui/templates/body-table-container.hbs' @ L5:C8) has been removed in Ember 2.0
at new Error (native)
at Error.EmberError (C:\xampp\htdocs\stack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:4552:21)
at assert (C:\xampp\htdocs\stack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:1495:13)
at Object.assert (C:\xampp\htdocs\mstack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:4322:34)
at assertPath (C:\xampp\htdocs\stack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:11608:22)
at C:\xampp\htdocs\stack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:11576:7
at Walker.visit (C:\xampp\htdocs\mstack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:18545:7)
at visitors.Program (C:\xampp\htdocs\stack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:18555:16)
at Walker.children (C:\xampp\htdocs\stack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:18578:7)
at Walker.visit (C:\xampp\htdocs\stack-ui\spoke\web-ui\bower_components\ember\ember-template-compiler.js:18546:12)

Can anyone help me to find the reason for this error?

ember-table doesn't seem to support Ember 2.0 as of now because they are still using views which were removed from Ember 2.0. Seems like there is an open pull request for converting everything to components but it's not merged yet.

You could try using the branch of the pull request or you could try to install the ember-legacy-views addon which enables views in Ember 2.0 (just until 2.4 though) but I am not sure if the ember-table will work properly with it.

ember-table 2.0 is in progress. There is already a release v2.0.0-alpha.2 . The old guides are outdated, but people can get familiar with it by checking out the dummy app on master branch!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM