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

fromBuffer doesn't work in ESM projects #1308

Closed
benmccann opened this issue Sep 2, 2024 · 3 comments · Fixed by #1309
Closed

fromBuffer doesn't work in ESM projects #1308

benmccann opened this issue Sep 2, 2024 · 3 comments · Fixed by #1309
Labels
released This issue/pull request has been released.

Comments

@benmccann
Copy link
Contributor

Expected Behavior

Doesn't crash

Current Behavior

Crashes

Failure Information (for bugs)

Steps to Reproduce

Create a new project with "type": "module" and then do await Jimp.fromBuffer(buffer);

Context

  • Jimp Version: 1.1.0
  • Operating System: Linux
  • Node version: 20.17.0

Failure Logs

node_modules/.pnpm/@jimp+core@1.1.0/node_modules/@jimp/core/dist/esm/index.js:161
            const mime = await fileType.fromBuffer(actualBuffer);
                                        ^

TypeError: fileType.fromBuffer is not a function
    at Jimp.fromBuffer (node_modules/.pnpm/@jimp+core@1.1.0/node_modules/@jimp/core/dist/esm/index.js:161:41)
@hipstersmoothie
Copy link
Collaborator

🚀 Issue was released in v1.1.1 🚀

@hipstersmoothie hipstersmoothie added the released This issue/pull request has been released. label Sep 2, 2024
@benmccann
Copy link
Contributor Author

thanks! looks like things are working for me on the v1 release now!

@hipstersmoothie
Copy link
Collaborator

Sweet, thanks for reporting issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants