This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Description
Steps to reproduce:
- create an app using cli
- ignite generate model foo
- try to include using this syntax
import {FooModel} from ".."
export const RootStoreModel = types.model("RootStore").props({
user: types.maybeNull(FooModel)
})
- see this error on log
Error: [mobx-state-tree] expected mobx-state-tree type as argument 1, got undefined instead
How i fixed it:
- created index.ts file in foo folder inside models
- add this code export * from "./foo"
- change the import to
import {FooModel} from "../foo"
I wasted 2 hours of debugging and pulling my hair. only to realize this.