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

Album-art is missing the "cross-fetch" dependency #21

Closed
Dartegnian opened this issue Jan 27, 2024 · 6 comments · Fixed by #22
Closed

Album-art is missing the "cross-fetch" dependency #21

Dartegnian opened this issue Jan 27, 2024 · 6 comments · Fixed by #22

Comments

@Dartegnian
Copy link
Contributor

image

This error shows up when compiling a project that depends on the album-art NPM package.

@lacymorrow
Copy link
Owner

Can you explain why this is needed?

@Dartegnian
Copy link
Contributor Author

Apparently isomorphic-fetch isn't recognized as a proper package/provider for the fetch function. Compiling without it yields me this error:

./node_modules/album-art/index.js - Error: Module not found: Error: Can't resolve 'cross-fetch' in '<PROJECT>/node_modules/album-art'

I'm using Angular and I can't install/run my project without installing cross-fetch into my project itself. The two packages are similar, though. With cross-fetch being more updated and having built-in TypeScript declarations.

I personally suggest isomorphic-fetch to just be replaced with cross-fetch.

@Dartegnian
Copy link
Contributor Author

I've replaced isomorphic-fetch with cross-fetch in commit 961575d.

@lacymorrow
Copy link
Owner

Works for me.

Thanks for the PR, cheers.

@Dartegnian
Copy link
Contributor Author

Thank you! Appreciate it, happy to help!

@Dartegnian
Copy link
Contributor Author

The PR also fixes a build error I get. The problem was also caused by isomorphic-fetch matthew-andrews/isomorphic-fetch#194. Thanks for accepting.

image
image

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 a pull request may close this issue.

2 participants