istanbuljs / nyc

the Istanbul command line interface
https://istanbul.js.org/
ISC License
5.58k stars 358 forks source link

Broken on 0.10 #275

Closed Raynos closed 8 years ago

Raynos commented 8 years ago
child_process.js:932
      throw new TypeError('Incorrect value for stdio stream: ' + stdio);
            ^
TypeError: Incorrect value for stdio stream: inherit
    at child_process.js:932:13
    at Array.reduce (native)
    at ChildProcess.spawn (child_process.js:887:17)
    at ChildProcess.wrappedSpawn [as spawn] (/home/raynos/uber/tcurl/node_modules/spawn-wrap/index.js:207:15)
    at exports.spawn (child_process.js:746:9)
    at module.exports (/home/raynos/uber/tcurl/node_modules/foreground-child/index.js:70:15)
    at Object.<anonymous> (/home/raynos/uber/tcurl/node_modules/nyc/bin/nyc.js:148:3)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Looks like a newer version of spawn-wrap is not 0.10 compatible.

jamestalmage commented 8 years ago

Duplicate of https://github.com/bcoe/nyc/pull/274

bcoe commented 8 years ago

@Raynos we bundle dependencies on newer versions of nyc, do you see this issue if you upgrade?

Raynos commented 8 years ago

@bcoe yes. Latest version of nyc had the issue.

I downgraded to nyc@4 to avoid this issue.

jamestalmage commented 8 years ago

Should be fixed with new version of foreground-child: https://github.com/tapjs/foreground-child/pull/12

bcoe commented 8 years ago

@Raynos mind verifying?

jamestalmage commented 8 years ago

@bcoe - We bundle foreground-child, so this probably requires a new release.

bcoe commented 8 years ago

@jamestalmage we've never bundled 1.5.0 is the thing, don't quite know what's happening to @Raynos but I'm glad we have a patch.

jamestalmage commented 8 years ago

PR to upgrade foreground-child: https://github.com/bcoe/nyc/pull/276

Raynos commented 8 years ago

nyc@6.4.4 with foreground-child@1.4.0 works

raynos at raynos-ThinkPad-T440p  ~/uber/tcurl on master*
$ npm ls foreground-child
tcurl@4.22.2 /home/raynos/uber/tcurl
└─┬ nyc@6.4.4
  └── foreground-child@1.4.0 

I think what was broken for me was npm i nyc@5 . my project had "nyc": "^5.0.1" which is suspect was before the bundling that came with 6.x

raynos at raynos-ThinkPad-T440p  ~/uber/tcurl on master*
$ npm ls foreground-child
tcurl@4.22.2 /home/raynos/uber/tcurl
└─┬ nyc@5.6.0
  └── foreground-child@1.5.1 

So when I saw that nyc was broken I tried updating with npm i nyc@5 instead of npm i nyc@latest

Raynos commented 8 years ago

However now both the 6.x and 5.x lines are fixed and working.

bcoe commented 8 years ago

@Raynos wonderful, there will be a new release a bit later tonight with the bundled fix too.