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

Fix 'browser' field in package.json #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pioug
Copy link
Contributor

@pioug pioug commented Aug 2, 2021

dist/jsmediatags.js is not published since 2cc8ca5

That causes error when using vite:

4:14:56 PM [vite] Internal server error: Failed to resolve entry for package "jsmediatags". The package may have incorrect main/module/exports specified in its package.json.

@lvegerano
Copy link

@aadsm can this be merge and released if possible?

radioprotector added a commit to radioprotector/edenator that referenced this pull request Jan 1, 2022
@bronisMateusz
Copy link

Until the author solves this problem, one solution is to use a patch-package from the npm repository.

You just need to add it to the package.json file in your project:
"scripts": { "postinstall": "patch-package" }

Then install the package:
npm i patch-package

In the package.json file of the jsmediatags package in line 22 substitute the following code for the browser value:
"browser": "dist/jsmediatags.min.js",

In te console call:
npx patch-package jsmediatags --exclude 'nothing'

And:
npm install

Problem solved!

@rockyessel
Copy link

rockyessel commented May 22, 2023

Im getting this error, after trying the above, is there anything that could help
`$ npm install

[email protected] postinstall
patch-package

'patch-package' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code 1
npm ERR! path C:\Users\essel_r\Desktop\appWriUploads\frontend
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c patch-package

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\essel_r\AppData\Local\npm-cache_logs\2023-05-22T04_17_29_210Z-debug-0.log
`

Edit:
Run npm i patch-package or you will get the above error

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

Successfully merging this pull request may close these issues.

4 participants