Comments (4)
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.
This part i got error
await client.request(
withToken(
process.env.ADMIN_TOKEN,
createField({
field: fieldName,
type: fieldType,
// field_field: value,
})
)
);
from directus.
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.
Error creating field: {
errors: [
{
message: "You don't have permission to access this.",
extensions: [Object]
}
],
from directus.
Related Issues (20)
- Permissions Dublicate - Fix HOT 3
- ERROR: "DB_CLIENT" Environment Variable is missing HOT 3
- List in block editor generating hyperlink on the next line HOT 1
- [SDK] Custom Storage configuration sometimes causes errors
- Permission inconsitency HOT 1
- Permissions error when using pg_restore HOT 5
- Environment variables: AUTH_<PROVIDER>_FIRST_NAME_KEY and AUTH_<PROVIDER>_LAST_NAME_KEY do not work HOT 2
- ERRNO 1 : SQLITE error when trying to crop or edit an image. HOT 1
- ROUTE_NOT_FOUND - Verify a Registration HOT 4
- Cannot load extension bundle on windows after updating Directus from 10.8.3 to 10.11.1 HOT 2
- Implement `meta` support in the SDK
- TypeError : Invalid URL, when loading directus bundle extension in directus version 10.11.2 on windows HOT 4
- Setting a preset for all users isn't working properly.
- Upload file via API returns 204 and empty body
- M2M uses wrong relation if two M2M relations use the same junction table
- Unable to Promote Version HOT 1
- Showing a nice structured JSON in "Log to Console" Logs
- Throw errors when present from sdk
- How to create or delete user by only admin approval HOT 1
- why I am use .with(staticToken('staticToken')) tip Invalid user credentials HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from directus.