I've been struggling with this errors for 2 days and can't realize why electron renderer process.stdin
fails in windows os.
How to reproduce:
type npm install devtool -g
then type devtool
inside the console type process.stdin
and there will be an error message 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(devtool update 2.x)
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
I encountered the same problem.
First I thought that devtool as REPL does not need stdin and was a simple bug in windows build. GitHub repo owners fix it just ignoring stdin on startup but, as you had discovered, devtool is broken and you can not do anything with stdin in windows.
As a proof of concept I create a simple example beyond devtool REPL:
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.
I had left a comment in your github issue but is closed so I opened a new one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With