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

Cannot read properties of undefined (reading 'referencedImages') #9044

Closed
1 task
J-env opened this issue Nov 10, 2023 · 1 comment · Fixed by #9049
Closed
1 task

Cannot read properties of undefined (reading 'referencedImages') #9044

J-env opened this issue Nov 10, 2023 · 1 comment · Fixed by #9049
Assignees
Labels
needs triage Issue needs to be triaged

Comments

@J-env
Copy link

J-env commented Nov 10, 2023

Astro Info

Astro                    v3.5.0
Node                     v18.18.0
System                   Linux (x64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             @astrojs/preact

If this issue only occurs in one browser, which browser is a problem?

Chrome

Describe the Bug

In Astro3.5.0 version, when using the client:only directive, the image information in the browser will report an error.
image

Is this supposed to be the code generated in ssr mode? Client js code shouldn't be so complicated.
image

What's the expected result?

It would be better if the client code is the same as Astro3.4.4 version.

const s  = { src: '/static-dev/test.a2872d8e.avif',
    width: 626,
    height: 358,
    format: 'avif' }

export {s as t}

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-sdeict-ffgcqm?file=src%2Fcomponents%2FTest2.tsx,src%2Fcomponents%2FTest.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 10, 2023
@Princesseuh Princesseuh self-assigned this Nov 10, 2023
@amxmln
Copy link

amxmln commented Nov 10, 2023

I can confirm this issue also crops up when generating static pages that contain a framework component which includes an import.meta.glob statement that imports images (SVGs in my case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants