Open saerdnaer opened 3 weeks ago
Hello @saerdnaer,
The limitation you're encountering with Directus 9 is known. Native Directus extensions typically require the main Directus modules, so installing them directly via npm install
often fails. Here's a straightforward workaround, whether you prefer installing the extension via npm install
or by adding the compiled code directly to the Directus extension folder.
Follow these steps for the directus-extension-schema-management-module:
Fork the extension or create a new branch.
Update the package.json
dependencies:
Change:
"devDependencies": {
"@directus/extensions-sdk": "9.18.1",
"sass": "^1.55.0",
"typescript": "^4.8.4",
"vue": "^3.2.40"
}
To:
"devDependencies": {
"@wbce-d9/extensions-sdk": "9.26.4", // Updated to the latest version
"sass": "^1.55.0",
"typescript": "^4.8.4",
"vue": "^3.2.40"
}
Replace all @directus
references with @wbce-d9
in the code (use find and replace).
Build the extension and add the .cjs
file to your Directus repo, typically at /extensions/modules/directus-extension-schema-management-module/index.cjs
.
Alternatively, you could rename the npm package and publish it for easier installation via npm.
Restart Directus.
This should help you switch to a Directus 9-compatible extension. Let us know if you have any more questions!
Describe the Bug
Hi, the readme states
but when I try to add the directus-extension-schema-management-module via
npm i directus-extension-schema-management-module
it does not appear in the project/system settings as described in there readme. https://github.com/rezo-labs/directus-extension-schema-management-module?tab=readme-ov-file#get-startedWhen starting directus9 I get following error message:
Do I need to modify the code or tsconfig.json so this extension also works with this fork?
Directus Version
v9.26.11
Hosting Strategy
Self-Hosted (Custom)