Unable to build astro app when using Picture component
See original GitHub issueI am getting the following error when I try to run npm run build
command:
It works when I comment component import:
import { Picture } from "astro-imagetools/components";
Also, I am getting warning:
Could not find a declaration file for module 'astro-imagetools/components'. './node_modules/astro-imagetools/components/index.js' implicitly has an 'any' type. If the 'astro-imagetools' package actually exposes this module, try adding a new declaration (.d.ts) file containing
declare module ‘astro-imagetools/components’;`
I am using astro-imagetool version 0.6.10
Am I doing something wrong?
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Image and Picture components not building on production due ...
Using Image or Picture components in an astro component cause the build to fail with __dirname is not defined in ES module scope....
Read more >@astrojs/image Astro Documentation
Learn how to use the @astrojs/image integration in your Astro project. ... The built-in <Image /> component is used to create an optimized...
Read more >[Solved] Image VIewer problem - Astro Pixel Processor
Good morning, I just downloaded the trial version of APP, but I cannot evaluate it because images doesn't load correctly.
Read more >Picture - Astro ImageTools Documentation
This component supports all the features that Astro ImageTools has to offer for regular images. It's perfect for advanced use cases where you...
Read more >Optimize Images & Dynamically Resize in Astro with Cloudinary
We'll walk through adding Cloudinary to a new Astro app by building a image component that can optimize and resize our images.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just had this issue, using astro
1.3.0
and astro-imagetools0.6.11
. I fixed it by adding"find-up": "^6.3.0"
in package.json as dev dependency, and then runningnpm install
.I’m getting the same issue, and deleting
node_modules
andpackage-log.json
is not fixing it. Addingfind-up
tovite.ssr.noExternal
also does not work.