Skip to content
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

Missing esm dirs cause build error #5

Open
cherealnice opened this issue Feb 21, 2022 · 0 comments
Open

Missing esm dirs cause build error #5

cherealnice opened this issue Feb 21, 2022 · 0 comments

Comments

@cherealnice
Copy link

cherealnice commented Feb 21, 2022

Hi!

I was trying out Vite and I got this error when building:
Failed to resolve entry for package "@mathdoy/toggle". The package may have incorrect main/module/exports specified in its package.json

After some digging it seems like the module setting in package.json is set to:
"module": "esm/toggle.js",

After running npm i, these esm directories do not exist which is causing this error. Removing the module field resolves the issue.

Happy to open a PR, just wasn't sure what the best path forward is for this, one solution is to nuke the module fields, another is to build esm and include them into the packages.

versions:
@mathdoy/toggle: 1.1.0
@mathody/toggle-react: 1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant