Code Monkey home page Code Monkey logo

Comments (10)

raae avatar raae commented on June 21, 2024 1

I made a question and answered it here: #215 and keeping this issue to reference when fixing the not optimal error message. Let me know if that works or not.

from gatsby-transformer-cloudinary.

nmampersand avatar nmampersand commented on June 21, 2024

Note: when I do provide the Cloudinary config options to the plugin and run gatsby develop, it does successfully upload my local images to Cloudinary but still throws the above error.

from gatsby-transformer-cloudinary.

raae avatar raae commented on June 21, 2024

That is not a great error message, so we'll make sure to fix that - ie. a better error message.

However the problem seems to be that your SanityCloudinaryAsset GraphQL type does not have the required fields for the plugin to work. It needs at least the fields: publicId and a cloudName.

Could you go to your GraphiQL UI (typically http://localhost:8000/___graphql) and check the shape of SanityCloudinaryAsset?

from gatsby-transformer-cloudinary.

nmampersand avatar nmampersand commented on June 21, 2024

Thank you! Hmm, it looks like it doesn't have a cloud name:

    {
          "name": "SanityCloudinaryAsset",
          "fields": [
            {
              "name": "_key"
            },
            {
              "name": "_type"
            },
            {
              "name": "public_id"
            },
            {
              "name": "resource_type"
            },
            {
              "name": "type"
            },
            {
              "name": "format"
            },
            {
              "name": "version"
            },
            {
              "name": "url"
            },
            {
              "name": "secure_url"
            },
            {
              "name": "width"
            },
            {
              "name": "height"
            },
            {
              "name": "bytes"
            },
            {
              "name": "duration"
            },
            {
              "name": "tags"
            },
            {
              "name": "created_at"
            },
            {
              "name": "derived"
            },
            {
              "name": "access_mode"
            },
            {
              "name": "_rawDerived"
            }
          ]
        }

from gatsby-transformer-cloudinary.

raae avatar raae commented on June 21, 2024

And the data is not in the shape required by this plugin (something I hope to make configurable in the future). You'll have to make your own nodes base on these nodes. I can give you an example of how to achieve this tomorrow (CET timezone).

from gatsby-transformer-cloudinary.

nmampersand avatar nmampersand commented on June 21, 2024

That would be great, thank you!

from gatsby-transformer-cloudinary.

github-actions avatar github-actions commented on June 21, 2024

🎉 This issue has been resolved in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from gatsby-transformer-cloudinary.

github-actions avatar github-actions commented on June 21, 2024

🎉 This issue has been resolved in version 4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from gatsby-transformer-cloudinary.

raae avatar raae commented on June 21, 2024

I would be forever grateful if you tested the newest beta nmampersand . It adds support for Sanity sourced Cloudinary assets by letting you configure the mapping of data.

yarn add [email protected]

Take a look at the documentation and let me know how it goes so I may improve if needed.

from gatsby-transformer-cloudinary.

raae avatar raae commented on June 21, 2024

@nmampersand, have you been able to test the 4.6.0-beta.1? Looking to make this a current version, but would love an external test before I do.

from gatsby-transformer-cloudinary.

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.