[SOLVED] Migrating to 3.x: Cannot read properties of undefined (reading 'onCreated')

Hi,

I am in the process of migrating my (quite large) 2.16 app to 3.1.2. I’ve read all related posts and guidelines that help the migration process and I think I covered all the needs, e.g. replaced all non-3.x compatible libraries, used async functions where necessary etc… (I’ve been working on this for quite a long time already.)

I then finally made the jump and upgraded via “meteor update” (which ran successfully) and rebuild all node libraries. Comparing to other related posts here, all updated libraries and packages have the correct latest versions.

However, when I now launch the new 3.x app I get the following error in the browser:

tplMasterLayout.ts:16 Uncaught TypeError: Cannot read properties of undefined (reading 'onCreated')
    at module (tplMasterLayout.ts:16:29)
    at fileEvaluate (modules-runtime.js?hash=7f501df34e33137bd35ae3560cdf4882195fdded:344:7)
    at Module.require (modules-runtime.js?hash=7f501df34e33137bd35ae3560cdf4882195fdded:246:14)
    at mod.require (modules.js?hash=ae17dd751b59bc18501b7b925510d141cb895fcb:301:33)
    at Module.moduleLink [as link] (modules.js?hash=ae17dd751b59bc18501b7b925510d141cb895fcb:373:22)
    at module (extAudioContext.ts:2:49)
    at fileEvaluate (modules-runtime.js?hash=7f501df34e33137bd35ae3560cdf4882195fdded:344:7)
    at Module.require (modules-runtime.js?hash=7f501df34e33137bd35ae3560cdf4882195fdded:246:14)
    at mod.require (modules.js?hash=ae17dd751b59bc18501b7b925510d141cb895fcb:301:33)
    at Module.moduleLink [as link] (modules.js?hash=ae17dd751b59bc18501b7b925510d141cb895fcb:373:22)

It seems any Template.xxx where xxx is a template is undefined, although the proper xxx.html is imported.

Has anyone experienced the same kind of errors yet when migrating to 3.x? Any ideas what might cause this? The same code (without the upgrade to 3.x) works fine in 2.16.

It turned out I had to change the import order of certain *.html and *.ts files.