在盖茨比云中加载插件时出现错误



当我尝试托管网站时,盖茨比云出现了一个奇怪的错误。这是因为我添加了代码语法高亮显示。奇怪的是,当我在本地主机上运行它时,它工作得很好,但当我使用Gatsby Cloud构建它时,它就失败了。(Gatsby Cloud使用我网站的github repo)

我得到的错误信息:

There was a problem loading plugin /usr/src/app/www/node_modules/@gatsby-cloud-pkg/gatsby-plugin-preview/dist/index.js. Perhaps you need to install its package?

我的gatsby-config.js文件:

module.exports = {
siteMetadata: {
...
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-image`,
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-prismjs`,
options: {},
}
]
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `software`,
path: `${__dirname}/src/software`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `post`,
path: `${__dirname}/src/post`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-image`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `GetMyIsland Portfolio`,
short_name: `GetMyIsland Portfolio`,
start_url: `/`,
background_color: `#000000`,
theme_color: `#000000`,
display: `standalone`,
icon: `src/images/icon/LogoTransparent.png`,
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}

就像我说的,安装prismjsgatsby-remark-prismjs后出现错误。

有没有人有一个关于我如何可以修复这个错误消息的想法,因为我无法在互联网上找到任何东西。如果你需要更多的信息,请告诉我,我很乐意帮忙。

尝试删除导致问题的插件以及您认为导致问题的插件/包并重新安装它们

最新更新