Tinro router error - transition_out

I thought I would play with Tinro router, but I’m falling at the first hurdle. I must be missing something basic, I am starting with a blank Meteor/Svelte app and just pasting in the “Getting Started” example code from the Tinro npm page.

Any route that calls another component like this:
<Route path="/contacts"><Contacts /></Route>
is crashing with this message:

index.mjs:774 Uncaught (in promise) TypeError: Cannot read property 'c' of undefined    at transition_out (index.mjs:774)
    at Object.outro [as o] (App.svelte:3)
    at A (modules.js?hash=77e963349eb1b927f0c7b8f6e4bcd0cfe9025a60:3138)
    at Object.o (modules.js?hash=77e963349eb1b927f0c7b8f6e4bcd0cfe9025a60:3138)
    at A (modules.js?hash=77e963349eb1b927f0c7b8f6e4bcd0cfe9025a60:3138)
    at Object.p (modules.js?hash=77e963349eb1b927f0c7b8f6e4bcd0cfe9025a60:3138)
    at P (modules.js?hash=77e963349eb1b927f0c7b8f6e4bcd0cfe9025a60:3138)
    at E (modules.js?hash=77e963349eb1b927f0c7b8f6e4bcd0cfe9025a60:3138)
    at meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:1234

Googling the problem suggests the issue is caused by the subcomponent (in this case Tinro) having a dependency on Svelte, which causes multiple versions of svelte to clash when compiling.

Tinro 3.3.0 has a devDependency on “svelte”: “^3.24.1”,
Current version of npm svelte loaded is 3.24.1
rdb:svelte-meteor-data seems to want svelte@3.16.4
meteor-svelte/meteor-svelte seems to want svelte 3.21.0

I can see suggested fixes in the pure svelte world where rollup or webpack are used, but I don’t know how to resolve this while using the Meteor build tools. Any suggestions welcome.

I haven’t found a way to get Tinro working, but I’ve switched to using svelte-routing and that has worked first time exactly as I wanted it, so I suppose that’s a result.

I ran into a similar issue. Has to do with how tinro is imported. Try doing this:

import { Route } from 'tinro/cmp/index.js';
1 Like