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

fix: fix mobx-react-lite release issue, fixes #3662 #3664

Merged
merged 2 commits into from
Mar 26, 2023
Merged

Conversation

mweststrate
Copy link
Member

Running prepublish locally on an empty check-out fails the mobx-react-lite build, as the types are nog generated when mobx itself hasn't been build:

(typescript) Error: /Users/mweststrate/Desktop/mobx/packages/mobx-react-lite/src/useLocalStore.ts(1,28): semantic error TS2307: Cannot find module 'mobx' or its corresponding type declarations.
Error: /Users/mweststrate/Desktop/mobx/packages/mobx-react-lite/src/useLocalStore.ts(1,28): semantic error TS2307: Cannot find module 'mobx' or its corresponding type declarations.

Fixed it by forcing a MobX build in the prepublish script

@changeset-bot
Copy link

changeset-bot bot commented Mar 26, 2023

🦋 Changeset detected

Latest commit: bda13bd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mobx-react-lite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@urugator
Copy link
Collaborator

Thank you. I still quite don't undestand the problem - why it used to work or why mobx-react doesn't have to do that ...

@mweststrate
Copy link
Member Author

My suspicion is that it depends on the order in which the publish commands are executed. But that order seems to be determined by Lerna and not by us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants