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

'$mobx' is not exported from 'mobx'. #1189

Closed
dillonredding opened this issue Feb 27, 2020 · 3 comments
Closed

'$mobx' is not exported from 'mobx'. #1189

dillonredding opened this issue Feb 27, 2020 · 3 comments

Comments

@dillonredding
Copy link

I'm unable to get this working in a React app. I ran the following to create a new react app and add redoc:

npx create-react-app my-app
cd my-app
npm i redoc mobx@^4.2.0 styled-components core-js

Then I added a spec file at /public/specs/spec.yaml and updated App.js to

import React from 'react';
import { RedocStandalone } from 'redoc';

function App() {
  return (
    <RedocStandalone specUrl="/specs/spec.yaml" />
  );
}

export default App;

After running npm start, I get the following:

Failed to compile.

./node_modules/redoc/node_modules/mobx-react/dist/mobxreact.esm.js
Attempted import error: '$mobx' is not exported from 'mobx'.
@BenRussert
Copy link

It seems to me that mobx 5+ is required, or at least the README needs some additional instructions.

This worked for me without the version range, (make sure mobx 5 installs):
npm i redoc mobx styled-components core-js

@lucaceriani
Copy link

It seems to me that mobx 5+ is required, or at least the README needs some additional instructions.

This worked for me without the version range, (make sure mobx 5 installs):
npm i redoc mobx styled-components core-js

I have the same issues and it persists after installing mobx 5+ ([email protected])

RomanHotsiy pushed a commit that referenced this issue Oct 13, 2020
Per #1189 (comment) the latest version works now, and the currently-specified version doesn't.
@lornajane
Copy link
Contributor

Thanks for reporting this, the current versions seem to be working correctly, and this issue has been open a while. I'll close it but please let us know if you see this again?

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

No branches or pull requests

4 participants