Coder Social home page Coder Social logo

Comments (4)

hanneskuettner avatar hanneskuettner commented on June 5, 2024

Before we have a look at this, can you please first trace down in what part of your code the error happens and which collection / field creation fails and the exact call you're making at that point? Having this information would go a long way of understanding this error.

from directus.

raselmiazi avatar raselmiazi commented on June 5, 2024

This part i got error

 await client.request(
                    withToken(
                        process.env.ADMIN_TOKEN,
                        createField({
                            field: fieldName,
                            type: fieldType,
                            // field_field: value,
                        })
                    )
                );

from directus.

hanneskuettner avatar hanneskuettner commented on June 5, 2024

Please have a look at the documentation of the createField function. The first Parameter should be the collectionName. https://docs.directus.io/packages/@directus/sdk/rest/functions/createField.html

Let me know if that helps you. I'll close this issue now as it seems to be no bug in Directus itself, but rather in your code. If you can, I'd recommend switching to Typescript for your project, as that would have caught the error early on as we do provide type information for the whole SDK. If you stumble on problems using Directus (which this is) and you're unsure if it is a bug or not, your first place to ask could be our Discord server where a helpful community helps you with your questions. See our Community Support.

For future issues, please share as much information as you can upfront, such that the issue can either be reproduced as easily as possible, also include what you have tried so far and where the errors happen. This saves the time of maintainers and helps us move along as easily as possible. Thank you!

PS: You can format your code to look like code and be more easily readable by using the code block syntax.

from directus.

raselmiazi avatar raselmiazi commented on June 5, 2024

Error creating field: {
errors: [
{
message: "You don't have permission to access this.",
extensions: [Object]
}
],

from directus.

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.