Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Wrong filename in package.json module field. #17

Open
NicolasReibnitz opened this issue Aug 28, 2021 · 0 comments
Open

Wrong filename in package.json module field. #17

NicolasReibnitz opened this issue Aug 28, 2021 · 0 comments

Comments

@NicolasReibnitz
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch vue-match-heights@0.1.1 for the project I'm working on.

Unfortunately, the ES module file is called dist/vue-match-heights.min.js in the npm package but referenced in package.json as dist/vue-match-heights.esm.js. That's why I got the following error when running vite:

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

Renaming the file to .esm.js fixed it.

Here is the diff that solved my problem:

diff --git a/node_modules/vue-match-heights/dist/vue-match-heights.min.js b/node_modules/vue-match-heights/dist/vue-match-heights.esm.js
similarity index 100%
rename from node_modules/vue-match-heights/dist/vue-match-heights.min.js
rename to node_modules/vue-match-heights/dist/vue-match-heights.esm.js

This issue body was partially generated by patch-package.

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

No branches or pull requests

1 participant