joyent/node — Issue #2092: fs.openSync failing on node.0.6.0 Windows 7
Author: tanepiper
Created: 2011-11-13 21:27:25+00:00
State: open

var fs = require('fs');
var file = fs.openSync('./mydoc.js');
console.log(file);

Looking to open a file on windows, get this error:

TypeError: Bad argument
at Object.openSync (fs.js:228:18)

when I pass with a utf8 flag:
var file = fs.openSync('./mydoc.js', 'utf8);

I get:
Error: Unknown file open flag: utf8

Does this method not had default flags?