cson
cson copied to clipboard
unknown conversion error
I have installed cson on Windows globally using npm install --global cson, but I get an unknown conversion error when I try to run the commands from Powershell:
> cson2json in.cson > out.json
Unknown conversion
> cat in.cson | cson2json > out.json
Unknown conversion
Can you debug on your side? I don't have windows so I cannot test.
To debug follow the contributing.md instructions and run npm link to expose the bins globally.
It looks like the command name isn't being sent along in process.argv:
[
'C:\\Program Files\\nodejs\\node.exe',
'C:\\Users\\redacted\\Projects\\redacted\\node_modules\\cson\\bin.js',
'path/to/file.cson'
]
I tried forcing the issue by using npx cson2json cson2json path/to/file.cson, but then process.argv.length equals 4 and boots me to the if-block that prints usage information.
I think I'm going to go back to using two seperate cli files, instead of the merging of one.
I'm experiencing the same issue. So far I have to manually edit cson/edition-esnext/bin.js to use the parser.
This was fixed in #136, but it was never merged. You can use that fork instead.