element icon indicating copy to clipboard operation
element copied to clipboard

2016.12.13 再次 _vm._h is not a function

Open gugotim opened this issue 9 years ago • 18 comments

"element-ui": "^1.0.6", "vue": "^2.1.5", "vue-loader": "^9.7.0" 今天npm install安装后,任何使用el的组件都报错,包括最简单的123, 不使用el组件一切正常,

gugotim avatar Dec 13 '16 04:12 gugotim

Vue 2.1.5 将 _h 重命名为 _c,而 Element 目前发的版本都是用以前的 compiler 编译的,导致新版 runtime 无法运行 Element。目前的解决方案是锁定 Vue 的版本为 2.1.4

QingWei-Li avatar Dec 13 '16 04:12 QingWei-Li

...刚刚手贱升级了vue于是炸了。。刚想提问就看到这个问题了

chs97 avatar Dec 13 '16 04:12 chs97

不久我们将发布新版 看了下 complier 新版编译后的代码是可以与旧版 vue 兼容的

QingWei-Li avatar Dec 13 '16 04:12 QingWei-Li

@QingWei-Li 不久是什么时候。。。今天能发么

chs97 avatar Dec 13 '16 05:12 chs97

头疼。。。同样手贱升级了vue。 现在又降下去了。 "vue-template-compiler": "2.1.4" "vue-loader": "10.0.0" "vue": "2.1.4"

An0nymous0 avatar Dec 13 '16 06:12 An0nymous0

@An0nymous0 降到2.1.4可以正常编译和运行吗,配置已经改成"vue-template-compiler": "2.1.4"了,但是编译报错

Vue packages version mismatch:
- [email protected]
- [email protected]

gugotim avatar Dec 13 '16 06:12 gugotim

@gugotim vue-loader也要降级。 不可以用 vue-loader1.0.2. 1.0.2调用也改成了_c了。 所以必须降级。

An0nymous0 avatar Dec 13 '16 06:12 An0nymous0

@An0nymous0 我用了 "vue-loader": "10.0.0" ,终于可以了

gugotim avatar Dec 13 '16 06:12 gugotim

[Vue warn]: Property or method "_c" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.

zlab avatar Dec 13 '16 06:12 zlab

终于找到

GeoffZhu avatar Dec 13 '16 06:12 GeoffZhu

还好看了眼这里提问,还在seg上问了很久,没人回答。 npm remove 之前的高版本,然后安装以下版本,搞定 "vue-template-compiler": "2.1.4" "vue-loader": "10.0.0" "vue": "2.1.4"

yuanyuanshen avatar Dec 13 '16 07:12 yuanyuanshen

这个问题太救命啦

beijiaxu avatar Dec 13 '16 07:12 beijiaxu

····本地看了半天这个问题,然后去jsfiddle发现一样有问题。就觉得版本有问题了

OrangeOran avatar Dec 13 '16 08:12 OrangeOran

我也是手贱第一次对项目的依赖做升级,然后导致了这个问题,看来要watch项目了,订阅一下邮件

ifibercc avatar Dec 13 '16 08:12 ifibercc

手贱调了大半天

Cyonet avatar Dec 13 '16 12:12 Cyonet

Sorry to ask, but will this be fixed on on this module's side? If so what would be the timeframe? Cheers

eljefedelrodeodeljefe avatar Dec 13 '16 13:12 eljefedelrodeodeljefe

@eljefedelrodeodeljefe Yes, in a day or two.

Leopoldthecoder avatar Dec 13 '16 14:12 Leopoldthecoder

1.0.7 已发布

QingWei-Li avatar Dec 14 '16 07:12 QingWei-Li