question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build astro app when using Picture component

See original GitHub issue

I am getting the following error when I try to run npm run build command: Screenshot 2022-08-09 at 21 59 51

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 containingdeclare module ‘astro-imagetools/components’;`

I am using astro-imagetool version 0.6.10

Am I doing something wrong?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Joffreybvncommented, Sep 24, 2022

Just had this issue, using astro 1.3.0 and astro-imagetools 0.6.11. I fixed it by adding "find-up": "^6.3.0" in package.json as dev dependency, and then running npm install.

2reactions
milkyskiescommented, Aug 19, 2022

I’m getting the same issue, and deleting node_modules and package-log.json is not fixing it. Adding find-up to vite.ssr.noExternal also does not work.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found