关于 Ember 应用程序升级到版本 2.14 的问题
Issue concerning the upgrade of an Ember app to the version 2.14
我对 ember (2.14) 的新版本有疑问。
我使用这个 help 升级了我的项目。
我修复了一些我遇到的问题,例如:
Transform -> DS.Transform.
但是有一个错误我无法解决,它是调试控制台中出现的警告:
DEPRECATION: Using "_lookupFactory" is deprecated. Please use
container.factoryFor instead. [deprecation id: container-lookupFactory]
See http://emberjs.com/deprecations/v2.x/#toc_migrating-from-_lookupfactory-to-factoryfor for more details.
at logDeprecationStackTrace (http://localhost:4200/assets/vendor.js:32785:21)
at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:33003:9)
at raiseOnDeprecation (http://localhost:4200/assets/vendor.js:32815:14)
at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:33003:9)
at invoke (http://localhost:4200/assets/vendor.js:33015:9)
at deprecate (http://localhost:4200/assets/vendor.js:32869:24)
at Container.lookupFactory (http://localhost:4200/assets/vendor.js:29145:54)
at Class._lookupFactory (http://localhost:4200/assets/vendor.js:57166:33)
at Locale._compileTemplate (http://localhost:4200/assets/vendor.js:92841:32)
logDeprecationStackTrace @ deprecate.js:116
HANDLERS.(anonymous function) @ handlers.js:14
raiseOnDeprecation @ deprecate.js:128
HANDLERS.(anonymous function) @ handlers.js:14
invoke @ handlers.js:26
deprecate @ deprecate.js:182
lookupFactory @ container.js:43
_lookupFactory @ container_proxy.js:26
_compileTemplate @ locale.js:116
getCompiledTemplate @ locale.js:60
t @ i18n.js:47
compute @ boolean-to-colored-yes-no.js:9
compute @ references.js:459
value @ references.js:70
compute @ reference.js:287
value @ reference.js:256
initialize @ reference.js:337
peek @ reference.js:311
evaluate @ runtime.js:6615
(anonymous) @ runtime.js:6562
evaluate @ runtime.js:202
next @ runtime.js:6115
execute @ runtime.js:6090
resume @ runtime.js:6081
handleException @ runtime.js:6360
handleException @ runtime.js:6551
_throw @ runtime.js:6245
evaluate @ runtime.js:411
execute @ runtime.js:6232
rerender @ runtime.js:5642
_this.render @ renderer.js:68
exports.runInTransaction @ ember-metal.js:693
_renderRoots @ renderer.js:335
_renderRootsTransaction @ renderer.js:373
_revalidate @ renderer.js:412
invokeWithOnError @ backburner.js:271
flush @ backburner.js:157
flush @ backburner.js:320
end @ backburner.js:399
run @ backburner.js:478
join @ backburner.js:491
run.join @ ember-metal.js:4456
(anonymous) @ has_element.js:18
exports.flaggedInstrument @ ember-metal.js:3883
handleEvent @ has_element.js:17
exports.default._emberMetal.Mixin.create._Mixin$create.handleEvent @ view_support.js:260
_bubbleEvent @ event_dispatcher.js:267
(anonymous) @ event_dispatcher.js:201
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
我已经检查过了,我没有调用 _lookupFactory。
总的来说,我对 ember 和 Javascript 很陌生。
它可能来自 i18n 插件。您可以在堆栈跟踪中看到:
t @ i18n.js:47
看起来插件所有者已经在一月份解决了这个问题。可以看到相关的pull request:https://github.com/jamesarosen/ember-i18n/pull/431/files
可能导致弃用的文件是:addon/utils/locale.js - 代码行:33:
const defaultConfig = this.owner._lookupFactory('ember-i18n@config:zh');
请升级您项目中依赖的 i18n 版本。
我对 ember (2.14) 的新版本有疑问。 我使用这个 help 升级了我的项目。 我修复了一些我遇到的问题,例如:
Transform -> DS.Transform.
但是有一个错误我无法解决,它是调试控制台中出现的警告:
DEPRECATION: Using "_lookupFactory" is deprecated. Please use
container.factoryFor instead. [deprecation id: container-lookupFactory]
See http://emberjs.com/deprecations/v2.x/#toc_migrating-from-_lookupfactory-to-factoryfor for more details.
at logDeprecationStackTrace (http://localhost:4200/assets/vendor.js:32785:21)
at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:33003:9)
at raiseOnDeprecation (http://localhost:4200/assets/vendor.js:32815:14)
at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:33003:9)
at invoke (http://localhost:4200/assets/vendor.js:33015:9)
at deprecate (http://localhost:4200/assets/vendor.js:32869:24)
at Container.lookupFactory (http://localhost:4200/assets/vendor.js:29145:54)
at Class._lookupFactory (http://localhost:4200/assets/vendor.js:57166:33)
at Locale._compileTemplate (http://localhost:4200/assets/vendor.js:92841:32)
logDeprecationStackTrace @ deprecate.js:116
HANDLERS.(anonymous function) @ handlers.js:14
raiseOnDeprecation @ deprecate.js:128
HANDLERS.(anonymous function) @ handlers.js:14
invoke @ handlers.js:26
deprecate @ deprecate.js:182
lookupFactory @ container.js:43
_lookupFactory @ container_proxy.js:26
_compileTemplate @ locale.js:116
getCompiledTemplate @ locale.js:60
t @ i18n.js:47
compute @ boolean-to-colored-yes-no.js:9
compute @ references.js:459
value @ references.js:70
compute @ reference.js:287
value @ reference.js:256
initialize @ reference.js:337
peek @ reference.js:311
evaluate @ runtime.js:6615
(anonymous) @ runtime.js:6562
evaluate @ runtime.js:202
next @ runtime.js:6115
execute @ runtime.js:6090
resume @ runtime.js:6081
handleException @ runtime.js:6360
handleException @ runtime.js:6551
_throw @ runtime.js:6245
evaluate @ runtime.js:411
execute @ runtime.js:6232
rerender @ runtime.js:5642
_this.render @ renderer.js:68
exports.runInTransaction @ ember-metal.js:693
_renderRoots @ renderer.js:335
_renderRootsTransaction @ renderer.js:373
_revalidate @ renderer.js:412
invokeWithOnError @ backburner.js:271
flush @ backburner.js:157
flush @ backburner.js:320
end @ backburner.js:399
run @ backburner.js:478
join @ backburner.js:491
run.join @ ember-metal.js:4456
(anonymous) @ has_element.js:18
exports.flaggedInstrument @ ember-metal.js:3883
handleEvent @ has_element.js:17
exports.default._emberMetal.Mixin.create._Mixin$create.handleEvent @ view_support.js:260
_bubbleEvent @ event_dispatcher.js:267
(anonymous) @ event_dispatcher.js:201
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
我已经检查过了,我没有调用 _lookupFactory。
总的来说,我对 ember 和 Javascript 很陌生。
它可能来自 i18n 插件。您可以在堆栈跟踪中看到:
t @ i18n.js:47
看起来插件所有者已经在一月份解决了这个问题。可以看到相关的pull request:https://github.com/jamesarosen/ember-i18n/pull/431/files
可能导致弃用的文件是:addon/utils/locale.js - 代码行:33:
const defaultConfig = this.owner._lookupFactory('ember-i18n@config:zh');
请升级您项目中依赖的 i18n 版本。