chris-l / mock-couch

A node.js module designed to mock a CouchDB server, mostly for unit testing purposes.
http://chris-l.github.io/mock-couch/
67 stars 44 forks source link

Doesn't seem to work with yarn #52

Closed tetsuo closed 7 years ago

tetsuo commented 7 years ago

Thanks! this is something I really needed today, but unfortunately couldn't make it work with yarn (not that I tried npm actually)

This is the error I am getting when I require the modue:

{ Error: Cannot find module './build/Release/DTraceProviderBindings'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/z/dev/x/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:18:23)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3) code: 'MODULE_NOT_FOUND' }
TAP version 13
# deploy
util.js:988
    throw new TypeError('The super constructor to "inherits" must not ' +
    ^

TypeError: The super constructor to "inherits" must not be null or undefined
    at Object.inherits (util.js:988:11)
    at Object.<anonymous> (/Users/z/dev/x/node_modules/spdy/lib/spdy/connection.js:86:6)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/z/dev/x/node_modules/spdy/lib/spdy.js:20:19)
chris-l commented 7 years ago

Hi!

Actually, I didn't even know what was yarn. But anyway, I installed it, and... I didn't have any problems with it. I used the command yarn add mock-couch and it installs it just fine.

Now, according to yarn's description, it creates a cache to avoid redownloading the dependencies over and over, so perhaps your yarn cache is damaged. Try to run yarn cache clean and try again.

tetsuo commented 7 years ago

Problem is actually related to dtrace-provider bindings, not mock-couch. I tried npm also, and it couldn't build the dtrace bindings either. I'm on macOS.

https://github.com/chrisa/node-dtrace-provider/issues This will probably fix by itself magically at some point, but, apparently, not on this version 🗡