【发布时间】:2021-09-02 15:49:14
【问题描述】:
我正在关注 gatsby 教程: https://www.gatsbyjs.com/docs/tutorial/
它工作得很好,除了插件在我的本地开发环境中工作正常,而不是在 gatbsy 云中。我必须做一些特别的事情才能在 gatsby 云中安装插件吗?我在文档或谷歌搜索中找不到任何东西,但也许我遗漏了一些明显的东西?
我的构建错误是:
Restoring previous build cache and dependencies
2.25s
Install project dependencies
36.76s
Pulling latest commits from repository
1.11s
There was a problem loading plugin "gatsby-plugin-image". Perhaps you need to install its package?
Use --verbose to see actual error.
For more details see https://gatsby.dev/issue-how-to
open and validate gatsby-configs, load plugins
0.02s
是的,我确实通过 NPM 在本地进行了安装,并且它在我的本地计算机上的开发模式下运行良好。
我的 gatsby-config.js 文件是:
module.exports = {
siteMetadata: {
siteUrl: "https://www.yourdomain.tld",
title: "Banana Rama",
},
plugins: [
"gatsby-plugin-gatsby-cloud",
"gatsby-plugin-image",
"gatsby-plugin-sharp",
{
resolve: "gatsby-source-filesystem",
options: {
name: `blog`,
path: `${__dirname}/blog`,
}
},
"gatsby-plugin-mdx",
"gatsby-transformer-sharp",
],
};
【问题讨论】:
标签: gatsby gatsby-plugin gatsby-cloud