NikhilVerma / jest-environment-node-debug-fixed

Fixed version of jest-environment-node-debug which works with Nodev7 and Jest 18
11 stars 4 forks source link

Error: Cannot find module 'jest-util' #6

Open dickeylth opened 7 years ago

dickeylth commented 7 years ago

I've installed the package as devDependency and ran node --inspect --debug-brk ./node_modules/.bin/jest --runInBand -i --env jest-environment-node-debug, but it threw an error:

 FAIL  test/specs/index.test.jsx
  ● Test suite failed to run

    Cannot find module 'jest-util'

      at Function.Module._resolveFilename (module.js:469:15)
      at Function.Module._load (module.js:417:25)
      at Module.require (module.js:497:17)
      at require (internal/module.js:20:19)
      at Object.<anonymous> (node_modules/jest-environment-node-debug/index.js:3:40)
      at Module._compile (module.js:570:32)
      at Object.Module._extensions..js (module.js:579:10)
      at Module.load (module.js:487:32)
      at tryModuleLoad (module.js:446:12)
      at Function.Module._load (module.js:438:3)

Is this due to https://github.com/NikhilVerma/jest-environment-node-debug-fixed/blob/master/index.js#L3 ?

datracka commented 7 years ago

I am having the same problem. Did you find out why? I installed jest-environment-node-debug-fixed but now TypeError: Cannot read property 'bind' of undefined?

I guess its a problem with Jest / node versionsß Currently I have node v8.1.0 and jest v19.0.2

eneasgallego commented 7 years ago

I had the same problem. Finally I solved it adding in the .npmrc file the next config:

depth=1