-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Node error when attempting to import @astrojs/image #4257
Comments
I'm sorry, code sandbox isn't working for me and neither is Stackblitz given that this is using sharp (a Node-only package). Tony is back next week and was close to getting us moved over to a WASM optimizer which should be much better for these platforms. |
marking as p2 because I haven't heard this reported anywhere else, but will still want to get this looked at next week. |
I'm also getting an error about
|
@FredKSchott All I did to get this error was a) install Astro, b) install |
Hey @sandervspl and @wonder95, I just ran through your reproduction steps and haven't been able to break things (yet). Mind sharing a bit more info?
|
Actually, I was able to debug this and get it working on CodeSandbox! Looks like you forgot to add the integration to your Can you confirm if adding this to your config fixes the problem? import { defineConfig } from 'astro/config'
+ import image from '@astrojs/image'
export default defineConfig({
+ integrations: [image()]
}) |
@natemoo-re On my local, this is my current
|
We just pushed out new versions of can you update codesandbox to match what you're seeing locally? I downloaded your codesandbox and it ran locally on the new versions, fyi |
@FredKSchott I updated my local to Thanks much! That was fast work. |
What version of
astro
are you using?1.0.0-beta.47
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
When attempting to use
@astrojs/image
version0.3.0
, I get the following error when I attempt to import it into my.astro
component:Here is a page where I am attempting to use it.
When I open it in Code Sandbox (see linked example), I get a different error:
However, the same as with my local, when I remove the import line for
@astrojs/image
, the error goes away, and the page works.Link to Minimal Reproducible Example
https://codesandbox.io/s/snowy-flower-gfhorc?file=/src/pages/index.astro
Participation
The text was updated successfully, but these errors were encountered: