juanjoDiaz / json2csv

Flexible conversion between JSON and CSV
https://juanjodiaz.github.io/json2csv/
MIT License
296 stars 32 forks source link

Cannot find module '@streamparser/json/index' or its corresponding type declarations. #34

Closed kaiyoma closed 1 year ago

kaiyoma commented 1 year ago

When trying to use this library, I am getting type errors from inside node_modules:

../../common/temp/node_modules/.pnpm/@types+json2csv__plainjs@6.1.0/node_modules/@types/json2csv__plainjs/src/StreamParser.d.ts:1:58 - error TS2307: Cannot find module '@streamparser/json/index' or its corresponding type declarations.

1 import { Tokenizer, TokenizerOptions, TokenParser } from '@streamparser/json/index';
                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error in ../../common/temp/node_modules/.pnpm/@types+json2csv__plainjs@6.1.0/node_modules/@types/json2csv__plainjs/src/StreamParser.d.ts:1

I'm using the latest version of this package (6.1.3) and the latest version of the types package (6.1.0).

Edit: I'm also using the latest version of @streamparser/json (0.0.14).

juanjoDiaz commented 1 year ago

This library was lacking typings altogether.

I just released v7.0.0 which entirely rewrites @json2csv to typescript.

Let me know if you find any issues with it. This was a massive change.

kaiyoma commented 1 year ago

@juanjoDiaz Cool! I'm in the middle of adjusting a lot of our project's dependencies, so I'll try out the new version and report back.