Redoc: Error: Cannot find module 'mobx' from 'redoc.lib.js'

Created on 10 Sep 2018  ยท  1Comment  ยท  Source: Redocly/redoc

I'm getting this strange error whenever I try to run my jest test. It was working fine previously but all of a sudden it started to fail.

````
FAIL src/components/Layout/Layout.test.js
โ— Test suite failed to run

Cannot find module 'mobx' from 'redoc.lib.js'

  at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
  at Object.<anonymous> (node_modules/redoc/bundles/redoc.lib.js:398:18)
  at __webpack_require__ (node_modules/redoc/bundles/redoc.lib.js:36:30)
  at Module.<anonymous> (node_modules/redoc/bundles/redoc.lib.js:5353:22)
  at __webpack_require__ (node_modules/redoc/bundles/redoc.lib.js:36:30)

````

im using version 2.0.0-alpha.38 and noticed that there was an error similar to this resolved for cli in alpha 30 i think (https://github.com/Rebilly/ReDoc/issues/576).

and i am importing to use redoc in my code by:
import { RedocStandalone } from 'redoc';

Thanks!

>All comments

Just install mobx: npm install mobx@^4.3.1.

mobx has been moved to peerDependencies so it is not installed automatically.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

typekpb picture typekpb  ยท  4Comments

JFCote picture JFCote  ยท  3Comments

yuji38kwmt picture yuji38kwmt  ยท  3Comments

bmarwell picture bmarwell  ยท  3Comments

ahshum picture ahshum  ยท  3Comments