Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2.0 object-node.d.ts subpathAtom error #968

Closed
garygentry opened this issue Aug 15, 2018 · 6 comments · Fixed by #969
Closed

3.2.0 object-node.d.ts subpathAtom error #968

garygentry opened this issue Aug 15, 2018 · 6 comments · Fixed by #969
Labels
has PR A Pull Request to fix the issue is available

Comments

@garygentry
Copy link

With a clean npm init project:
"mobx": "5.0.3",
"mobx-state-tree": "3.2.0"

node_modules/mobx-state-tree/dist/core/node/object-node.d.ts
Object.subpathAtom

has this value:

subpathAtom: import("../../../../../../../../VSProjects/github/mobx-state-tree/node_modules/mobx/lib/core/atom").IAtom;

installed 3.1.1 and it looks like this:

subpathAtom: import("mobx/lib/core/atom").IAtom;

image

Is this a problem with the build?

@RainerAtSpirit
Copy link
Contributor

I've seen this before with mst3.1.x and it looks like an issue with TypeScript 2.9.2 microsoft/TypeScript#24599. TypeScript 3.x claims to have that solved, but we can't upgrade to that version as we're running into other issues with it.

One way to address it might be adding back IAtom as an explicit import. It was removed in this commit a few days before. 4dab02c

@k-g-a k-g-a changed the title 3.2.1 object-node.d.ts subpathAtom error 3.2.0 object-node.d.ts subpathAtom error Aug 15, 2018
@k-g-a
Copy link
Member

k-g-a commented Aug 15, 2018

Actually, there are no explicit imports of IAtom at 3.1.1 either.
Nevertheless, adding it back really changes subpathAtom import from relative back to normal.

@k-g-a k-g-a added the has PR A Pull Request to fix the issue is available label Aug 15, 2018
@xaviergonz
Copy link
Contributor

Should be fixed in 3.2.1 now, sorry about that!

@xaviergonz
Copy link
Contributor

@RainerAtSpirit what kind of issues are you running into with TS3.0? just curiours

@garygentry
Copy link
Author

3.2.1 seems to work. I was in the process of upgrading to typescript 3.0.1 (from 2.7.2). So I'm clear, any issues with mst and typescript 3.0.1?

@RainerAtSpirit
Copy link
Contributor

@xaviergonz TS3.0.1 produces a bunch of Typing errors in our projects. Haven't found the root issue yet, so we're down to TS2.8.4. Probably related to the fact that we're creating common things like stores as separate private npm packages and then consume those in our projects. d.ts output changed between 2.8.4/2.9.2 and 3.0.1 and there are some issues related to that on the typescript repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR A Pull Request to fix the issue is available
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants