Comments (7)
我也遇到了这个问题,查了 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.
可以检查一下是否已通过 pnpm add sharp
安装 Sharp
from fuwari.
重新执行pnpm add sharp
安装之后,再次运行还是相同的问题
from fuwari.
删除node_modules,重新pnpm install试试;我也遇到这个/_image安装时为500的情况的,就是这样解决的。
from fuwari.
删除node_modules,重新pnpm install试试;我也遇到这个/_image安装时为500的情况的,就是这样解决的。
应该是我电脑环境的问题,换其他电脑没有问题。
from fuwari.
@CosmoLau 好的,谢谢,我试一下
from fuwari.
@Rabbit937 才发现有个 PR 修复了这个问题,但是 PR 还没合并,你可以试试这个 #92
from fuwari.
Related Issues (20)
- how to change post path? HOT 1
- request to add static cms feature HOT 4
- Handle site localization in client to support automatic language switching HOT 1
- Banner无法调整位置 HOT 3
- [功能建议]主题更新可以使用pnpm或者npm进行吗 HOT 1
- [功能建议]关于博客运行时间和图库功能的加入 HOT 2
- tag keyword matching (c#) HOT 1
- [功能建议]我希望对于代码块右上角能够一键复制
- 报错
- [问题] 想问一下代码高亮是跟哪个文件相关 HOT 2
- theme
- theme HOT 1
- Base URL is not pointing and not working, when switched to Responsive view (Mobile View) HOT 2
- 请问如何在这项目中添加点赞功能, 对每篇blog有点赞的统计和显示 HOT 4
- 建议添加关于自定义的一些详细介绍
- [feat] implement linter e code formatter HOT 1
- Bug of design in post meta component. HOT 2
- TypeError: Cannot read properties of undefined (reading 'data')
- 建议添加文章目录选项 HOT 1
- To avoid getting the extra new empty line in Fenced Code Block HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuwari.