Edmund1645 / gridsome-plugin-blog-cover

Automatically generate cover images for your Gridsome blog posts 🔁 🏞
GNU General Public License v3.0
6 stars 2 forks source link

Images are created and uploaded, but build process doesn't finish #1

Open gabriel4649 opened 4 years ago

gabriel4649 commented 4 years ago

Hi!

Thanks for creating this amazing plugin.

node_modules/gridsome/lib/plugins/TemplatesPlugin.js:384
      node.internal.publicPath[name] !== oldNode.internal.publicPath[name] &&
                              ^

TypeError: Cannot read property 'default' of undefined
    at Template.updatePage (/home/gabriel/コード/caproni-marketing/node_modules/gridsome/lib/plugins/TemplatesPlugin.js:384:31)
    at EventEmitter.emit (/home/gabriel/コード/caproni-marketing/node_modules/eventemitter3/index.js:203:33)
    at Collection.updateNode (/home/gabriel/コード/caproni-marketing/node_modules/gridsome/lib/store/Collection.js:143:18)
    at /home/gabriel/コード/caproni-marketing/node_modules/gridsome-plugin-blog-cover/gridsome.server.js:47:28
    at /home/gabriel/コード/caproni-marketing/node_modules/cloudinary/lib/utils/index.js:1073:12
    at IncomingMessage.<anonymous> (/home/gabriel/コード/caproni-marketing/node_modules/cloudinary/lib/uploader.js:402:9)
    at IncomingMessage.emit (events.js:215:7)
    at endReadableNT (_stream_readable.js:1183:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Do you have any ideas what might be causing this?

I see that the images are successfully created and uploaded.

Brettanda commented 4 years ago

Can you share what you have set up in your gridsome.config.js file?

gabriel4649 commented 4 years ago
module.exports = {
  siteName: 'Caproni',
  siteUrl: process.env.SITE_URL || 'https://caproni.fm',
  plugins: [
    'gridsome-plugin-robots',
    '@gridsome/plugin-sitemap',
    {
      use: '@gridsome/source-filesystem',
      options: {
        path: 'recursos/**/*.md',
        typeName: 'ProjectPost',
        resolveAbsolutePaths: true,
        remark: {
          externalLinksTarget: '_blank',
          externalLinksRel: ['nofollow', 'noopener', 'noreferrer'],
        },
      },
    },
    {
      use: 'gridsome-plugin-blog-cover',
      options: {
        typeName: 'ProjectPost',
        outputDir: './cover_images',
        domain: 'https://caproni.fm',
        coverField: 'cover_image',
        cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
        api_key: process.env.CLOUDINARY_API_KEY,
        api_secret: process.env.CLOUDINARY_API_SECRET,
      },
    },
  ],
  transformers: {
    remark: {
      plugins: ['@gridsome/remark-prismjs'],
    },
  },
};
Brettanda commented 4 years ago

I can't seem to re-create this error on my end. Do you have a public repository for your project?

ggorlen commented 1 year ago

I saw this error too when I tried to save a content markdown file with gridsome develop running, although not when using this particular plugin. It seems to be related to https://github.com/gridsome/gridsome/issues/1015 and there's a workaround in that thread.