json-2-csv icon indicating copy to clipboard operation
json-2-csv copied to clipboard

Error while running tests

Open neoncube2 opened this issue 7 months ago • 2 comments

After cloning this repo, when I run mocha -r ts-node/register test/index.ts, I get this error:

Exception during run: SyntaxError: C:\example\json-2-csv\test\data\json\trimmedFields.json: Unexpected token 'a', "assortedValues.json" is not valid JSON

Indeed, trimmedFields.json is not valid JSON: it just contains the text "assortedValues.json"

Just FYI! :)

neoncube2 avatar Aug 01 '25 19:08 neoncube2

Hi @neoncube2, I believe this is because that file is actually a symbolic link, and Windows doesn't seem to handle it correctly. Thanks for reporting this- I'll have to look into alternative approaches that are more cross-platform friendly.

mrodrig avatar Oct 28 '25 01:10 mrodrig

@mrodrig Oh, interesting! :) I didn't realize that Git even supported symbolic links.

neoncube2 avatar Nov 04 '25 04:11 neoncube2