ok-mdx icon indicating copy to clipboard operation
ok-mdx copied to clipboard

Error: Cannot find module './lib/websocket'

Open merelinguist opened this issue 6 years ago • 2 comments

Followed the setup guide in the README, tried to run mdx docs --open, and received: Error: Cannot find module './lib/websocket'.

Full error:

$ mdx docs --open

----
internal/modules/cjs/loader.js:596
    throw err;
    ^

Error: Cannot find module './lib/websocket'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/Dylan/.config/yarn/global/node_modules/ws/index.js:3:19)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)

merelinguist avatar Jul 25 '18 16:07 merelinguist

Thanks! Do you mind clarifying a little bit more about how you installed ok-mdx?

  • What versions of node and npm are you using?
  • Was it a global install?
  • Do you see the same error if installed locally as a dev dependency?
  • Do you have any other local dependencies installed in the directory you're seeing this? (running npm ls will give you a list)

jxnblk avatar Jul 25 '18 21:07 jxnblk

Sure!

  • Node: v10.4.1, yarn: 0.27.5
  • It was a global install
  • I tried installing as a dev dependency and got the same error
  • No other dependencies

I also tried using npm instead of yarn and got the same error

merelinguist avatar Jul 26 '18 12:07 merelinguist