Experience-Monks / devtool

[OBSOLETE] runs Node.js programs through Chromium DevTools
MIT License
3.77k stars 150 forks source link

Windows Error: Implement me. Unknown stdin file type! #42

Closed rafaelcastrocouto closed 8 years ago

rafaelcastrocouto commented 8 years ago

How to reproduce:

type npm install devtool -g then type devtool inside the console there will be two errors, one at line 127 and the other at line 128 at C:\Users\rafael\AppData\Roaming\npm\node_modules\devtool\node_modules\electron-prebuilt\dist\resources\atom.asar\renderer\lib\init.js

Error: Implement me. Unknown stdin file type!

C:\Users\rafael\AppData\Roaming\npm\node_modules\devtool\node_modules\electron-prebuilt\dist\resour…:127 Error: Implement me. Unknown stdin file type!(…)(anonymous function) @ C:\Users\rafael\AppData\Roaming\npm\node_modules\devtool\node_modules\electron-prebuilt\dist\resour…:127Module._compile @ module.js:425Module._extensions..js @ module.js:432Module.load @ module.js:356Module._load @ module.js:313Module.runMain @ module.js:457startup @ node.js:151(anonymous function) @ node.js:1007
C:\Users\rafael\AppData\Roaming\npm\node_modules\devtool\node_modules\electron-prebuilt\dist\resour…:128 Error: Implement me. Unknown stdin file type!
    at process.stdin (node.js:747)
    at hookProcess (C:\Users\rafael\AppData\Roaming\npm\node_modules\devtool\lib\preload.js:117)
    at C:\Users\rafael\AppData\Roaming\npm\node_modules\devtool\lib\preload.js:29
    at Object.<anonymous> (C:\Users\rafael\AppData\Roaming\npm\node_modules\devtool\lib\preload.js:129)
    at Module._compile (module.js:425)
    at Object.Module._extensions..js (module.js:432)
    at Module.load (module.js:356)
    at Function.Module._load (module.js:313)
    at Module.require (module.js:366)
    at require (module.js:385)(anonymous function) @ C:\Users\rafael\AppData\Roaming\npm\node_modules\devtool\node_modules\electron-prebuilt\dist\resour…:128Module._compile @ module.js:425Module._extensions..js @ module.js:432Module.load @ module.js:356Module._load @ module.js:313Module.runMain @ module.js:457startup @ node.js:151(anonymous function) @ node.js:1007
satrong commented 8 years ago

I also encountered the same problem on win10

wxqqh commented 8 years ago

Me too~~~

kevinkindom commented 8 years ago

+1

mattdesl commented 8 years ago

I just pushed some code to ignore process.stdin on Windows. I will try to test soon on a Windows PC to see if there is a nice way of handling this. Let me know if 1.8.3 allows you to work without errors.

To update: npm install devtool -g

rafaelcastrocouto commented 8 years ago

Good job :+1:

Knighton910 commented 8 years ago

@rafaelcastrocouto are you running on 1.8.3?

rafaelcastrocouto commented 8 years ago

no, i'm on 2.0.2

Knighton910 commented 8 years ago

@rafaelcastrocouto I don't have a windows environment to try this in, can you post this question on nodejs/node gitter, Or the irc?

Knighton910 commented 8 years ago

@mattdesl is there anyway, you can verify that 2.0.2 is acting buggy for process.stdin?

mattdesl commented 8 years ago

I will test on a Windows machine on Monday. 👌

Sent from my iPhone

On Apr 2, 2016, at 3:07 AM, kelvin knighton notifications@github.com wrote:

@mattdesl is there anyway, you can verify that 2.0.2 is acting buggy for process.stdin?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

Knighton910 commented 8 years ago

Awesome @mattdesl

rafaelcastrocouto commented 8 years ago

It's still buggy in 2.x ... it just don't show the error msg on load, but if you type process.stdin in the devtool's console it will throw the error.

jlvaquero commented 8 years ago

I encountered the same problem. This piece of code does not work.

//test.js
var readline = require('readline');
var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: true
});

rl.on('line', function(line){
    console.log(line);
})

devtool test.js < input.txt

Error: Implement me. Unknown stdin file type!

Windows 7 x64 S.O. Admin rights. Node v5.10.0. npm v3.8.3. DevTool v1.9.1.