juanjoDiaz / streamparser-json

Streaming JSON parser in Javascript for Node.js and the browser
MIT License
138 stars 11 forks source link

Cannot import package, incorrect exports #19

Closed pgiraud closed 2 years ago

pgiraud commented 2 years ago

I tried to use the package in a vite project and I get the following error:

[vite] Internal server error: Failed to resolve entry for package "@streamparser/json". The package may have incorrect main/module/exports specified in its package.json.

It seems like the "module" key in package.json points to a not existing file ./dist/mjs/index.js.

tobiasfuhlroth commented 2 years ago

@pgiraud Had the same problem. See https://github.com/juanjoDiaz/streamparser-json/pull/18 for a solution.

juanjoDiaz commented 2 years ago

Thanks for reporting! Solved in version 0.10