Closed jon49 closed 9 years ago
Looks like Windows might have different error code in case a module is not found.
Can you try creating an empty file at C:\Users\1198462\.config\ramda-cli.js
?
Now I get the following when adding the empty file.
ramda : Error: evalmachine.<anonymous>:1
At line:2 char:1
+ ramda --no-stdin 'always "hello world"' 'add __, \!'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Error: evalmachine.<anonymous>:1:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
pipe(always(hello), world, add(__, '!'));
^
hello is not defined
When I switch the quotes like so:
ramda --no-stdin "always 'hello world'"
it outputs:
"hello world"
So, that seemed to work. Not sure why it is pointing to that directory though.
It's trying to read a config from that place.
Can you add these console.log
lines to the compiled ramda-cli/lib/main.js
that is somewhere in your system, and see what it logs when you remove C:\Users\1198462\.config\ramda-cli.js
53 makeSandbox = function(){
54 var userConfig, e, ref$;
55 try {
56 userConfig = require(config.BASE_PATH);
57 } catch (e$) {
58 e = e$;
59 console.log(e.code)
60 console.log(e.message)
^^^^^^^^^^^^^^^^^^^^^^^^^
You have to use "" for CLI arguments on windows.
code: MODULE_NOT_FOUND
message: Cannot find module 'C:\Users\1198462\.config\ramda-cli'
Makes sense. I published a new version with a fix.
And thank you @jon49 and @vendethiel
That did it. Thanks. Great tool!
I'm not fully familiar with how node/npm does console apps and I don't have much time for more debugging (I might have time later). But this is a start.
Not sure what exactly is going on but when I run this command (the others give errors too, but one thing at a time :-) ):
I get this output
when I intercept the call in
C:\Program Files (x86)\nodejs\node_modules\ramda-cli\bin
withconsole.log(process.argv, process.stdin, process.stdout, process.stderr)
: