alissonmbr / react-xml-viewer

MIT License
30 stars 20 forks source link

Missing build file `index.js` #66

Closed dropbeardan closed 1 year ago

dropbeardan commented 1 year ago

Hey, loving the package.

I've recently had to plug this in to a project with vitest and running into some test issues related to:

FAIL src/App.spec.tsx [ src/App.spec.tsx ] Error: Failed to resolve entry for package "react-xml-viewer". The package may have incorrect main/module/exports specified in its package.json.

Upon investigation, it seems that this repo's package.json references a main: index.js entrypoint which doesn't actually exist in the dist folder after building.

alissonmbr commented 1 year ago

Hey @dropbeardan, thanks for reporting the issue. The package.json was pointing to the wrong file, should be index.umd.js instead. I changed it to the correct file, but I didn't had time to test it. Can you test this beta version 2.0.1-beta.1? If everything is fine, I can publish the version 2.0.1 this week.

rainbow180 commented 1 year ago

Hi, I hit this same issue and have just tested the 2.0.1-beta.1 and that has fixed it for me. Thanks.

alissonmbr commented 1 year ago

Thanks for testing @rainbow180, I just published the version 2.0.1