'$mobx' is not exported from 'mobx'.
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'.
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
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])
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?