-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error importing JSONParser
#25
Comments
Hi @tegefaulkes , Which version of @streamparser/json are you using? The types are embedded in the package: https://github.com/juanjoDiaz/streamparser-json/blob/main/packages/plainjs/package.json#L8-L15 so there shouldn't be any problem. You can check in your You can see here that a bunch of people is using it without a problem. |
Our tsconfig specifies If we use a simple script like this: import { JSONParser } from '@streamparser/json';
async function main() {
console.log(JSONParser);
}
main(); Then attempt to compile with
Current version of The We use lots of other packages, this is the first we have encountered this problem. Is it because of different package configuration? |
We don't use any bundler. It's just We're also using |
Full
|
Hi guys, Indeed there seems to be an issue in versions after 0.10. |
I have it fixed on my end. As a hint, I went to the "typesVersions": {
"*": {
"*": ["./src/*"]
}
}, The typings were immediately matched in my VS Code. Not sure why the |
Cool, are you going to release a new version with the fix? |
Thanks for the hint. The issue seems caused by a bug in Typescript: microsoft/TypeScript#43133 I'll do a fix asap 🙂 |
This is fixed as part of 0.0.13. Thanks for your patience! |
Nice! |
In our code base when we try to import
JSONParser
withimport { JSONParser } from '@streamparser/json';
we get the following errorTS2307: Cannot find module '@streamparser/json' or its corresponding type declarations.
.Currently as a work around we are importing it with
const jsonStreamParsers = require('@streamparser/json');
which works fine.My question is, do you have any insights to why the usual import is failing? Or is this likely a problem with the configuration of our project in some way?
Thanks.
@streamparser/json
results in error when usingtsc
orjest
relying ontsc
MatrixAI/Polykey#516The text was updated successfully, but these errors were encountered: