Giter VIP home page Giter VIP logo

Comments (7)

CosmoLau avatar CosmoLau commented on June 15, 2024 1

我也遇到了这个问题,查了 Astro 和 Sharp 的 issue,通过改 node 版本和降 sharp 版本都没法解决,还是显示不了图片。

目前只能根据 https://docs.astro.build/zh-cn/reference/errors/missing-sharp/ 提供的办法来禁用图片处理服务。

astro.config.mjs 中添加代码:

import { defineConfig, passthroughImageService } from "astro/config";
export default defineConfig({
 image: {
   service: passthroughImageService(),
 },
});

from fuwari.

saicaca avatar saicaca commented on June 15, 2024

可以检查一下是否已通过 pnpm add sharp 安装 Sharp

from fuwari.

Rabbit937 avatar Rabbit937 commented on June 15, 2024

image
重新执行pnpm add sharp安装之后,再次运行还是相同的问题

from fuwari.

1999-xinz avatar 1999-xinz commented on June 15, 2024

删除node_modules,重新pnpm install试试;我也遇到这个/_image安装时为500的情况的,就是这样解决的。

from fuwari.

Rabbit937 avatar Rabbit937 commented on June 15, 2024

删除node_modules,重新pnpm install试试;我也遇到这个/_image安装时为500的情况的,就是这样解决的。

应该是我电脑环境的问题,换其他电脑没有问题。

from fuwari.

Rabbit937 avatar Rabbit937 commented on June 15, 2024

@CosmoLau 好的,谢谢,我试一下

from fuwari.

CosmoLau avatar CosmoLau commented on June 15, 2024

@Rabbit937 才发现有个 PR 修复了这个问题,但是 PR 还没合并,你可以试试这个 #92

from fuwari.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.