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

SpeedKit Image issue in getImageSize function #887

Closed
alghifarifikri opened this issue Nov 7, 2023 · 10 comments
Closed

SpeedKit Image issue in getImageSize function #887

alghifarifikri opened this issue Nov 7, 2023 · 10 comments

Comments

@alghifarifikri
Copy link

alghifarifikri commented Nov 7, 2023

Describe the bug
I got several issues when use <speedkit-image />.

  1. getImageSize: https://{IMAGE_URL} TypeError [ERR_INVALID_ARG_TYPE]: The "obj" argument must be an instance of Blob. Received an instance of Blob
  2. getImageSize: https://{IMAGE_URL} FetchError: (404 Not Found (https://{IMAGE_URL})) (In Docker Swarm)
  3. getImageSize: https://{IMAGE_URL} TypeError : body used already for: https://{IMAGE_URL} (In Docker Swarm)

To Reproduce
Steps to reproduce the behavior:

  1. Install the package
  2. use speedkit image
    <speedkit-image v-bind="image" @load="onLoadImage" />
    image: { source: { format: 'webp', src: this.url, sizes: { default: '100vw', xxs: '100vw', xs: '100vw', sm: '100vw', md: '100vw', lg: '100vw', xl: '100vw', xxl: '100vw' } }, title: this.title, alt: this.alt, }
  3. Run npm run dev
  4. See error

Expected behavior
The images loaded successfully, and did not cause any errors, especially when using Google Lighthouse.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
@ThornWalli
Copy link
Contributor

Hello @alghifarifikri,

which node version and nuxt are you using?

@alghifarifikri
Copy link
Author

alghifarifikri commented Nov 7, 2023

Hello @alghifarifikri,

which node version and nuxt are you using?

Hello @ThornWalli
I'm using Node v16.16.0 and Nuxt 3.5.1

@ThornWalli
Copy link
Contributor

ThornWalli commented Nov 7, 2023

@alghifarifikri Can you update your node to a newer version?

@alghifarifikri
Copy link
Author

@alghifarifikri Can you update your node to a newer version?

@ThornWalli I haven't tried it, is the solution just to upgrade the node version ?

@alghifarifikri
Copy link
Author

alghifarifikri commented Nov 7, 2023

@alghifarifikri Can you update your node to a newer version?

image
I'm try to update Node to new version and still error.

@ThornWalli
Copy link
Contributor

Which node version did you go to?

I tested the project myself under Windows 10 with Node 19.9.0 and it runs as expected.

Your error message may be due to an outdated node version being used.

There were a few changes between Node 16 and 19.

@alghifarifikri
Copy link
Author

Which node version did you go to?

I tested the project myself under Windows 10 with Node 19.9.0 and it runs as expected.

Your error message may be due to an outdated node version being used.

There were a few changes between Node 16 and 19.

I'm using node version 20, do I need to downgrade again?

@ThornWalli
Copy link
Contributor

Extremely strange...

I also tested again with Node 20.9.0 and no problems...

Ran without problems, in the project repo and in a project with an installed package.

Could you share your installed dependency and the nuxt.config?

@alghifarifikri
Copy link
Author

Extremely strange...

I also tested again with Node 20.9.0 and no problems...

Ran without problems, in the project repo and in a project with an installed package.

Could you share your installed dependency and the nuxt.config?

this is my dependency
image

this is my nuxt.config for nuxt-speedkit
image
image

Let me know if anything is missing or wrong.

@ThornWalli
Copy link
Contributor

I'm closing this issue for now.
Let me know if this bug still exists 🙃

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

2 participants