Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New extensions in bundle aren't reloaded in development mode #21922

Closed
ChappIO opened this issue Mar 20, 2024 · 5 comments · Fixed by #22013
Closed

New extensions in bundle aren't reloaded in development mode #21922

ChappIO opened this issue Mar 20, 2024 · 5 comments · Fixed by #22013

Comments

@ChappIO
Copy link

ChappIO commented Mar 20, 2024

Describe the Bug

Whenever I edit my extension's package.json while developing, directus does not reload it. Even een reboot does not solve my issue. I have to drop my database and rebootstrap.

To Reproduce

  1. Create a directus extension folder in extension/demo with the "bundle" type.
  2. Add a hooks extension to the bundle called "hooks1"
  3. Bootstrap and run directus with EXTENSIONS_AUTO_RELOAD=true
  4. Add another hooks extension to the bundle called "hooks2"
  5. The demo/hooks2 extension is not loaded
  6. Restart directus
  7. The demo/hooks2 extention is not loaded
  8. Drop database and rebootstrap
  9. The demo/hooks2 extension is loaded

Directus Version

v10.10.4

Hosting Strategy

Self-Hosted (Custom)

@ChappIO
Copy link
Author

ChappIO commented Mar 20, 2024

We (very) briefly discussed this in Discord: https://discord.com/channels/725371605378924594/1145983898644389908/1217565350594609213

@br41nslug
Copy link
Member

Are you rebuilding the bundle extension after changes? I dont see that crucial step in the reproduction steps.

@ChappIO
Copy link
Author

ChappIO commented Mar 20, 2024

Are you rebuilding the bundle extension after changes? I dont see that crucial step in the reproduction steps.

Yes, fair enough. My extension is running in watch mode. And the Directus logs even show "Extensions reloaded" when I restart the directus sdk. The dist folder also contains the sources for my new hook. But http://localhost:8055/admin/settings/extensions doesn't show my new extension.

@ChappIO
Copy link
Author

ChappIO commented Mar 20, 2024

No idea if it helps but I just removed all records from directus_extensions and restarted directus. That was sufficient to trigger a rescan.

@Markus-Brand
Copy link

I had the same issue and also resolved it by removing all records from the directus_extensions and restarting directus.
An automatic update would be much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants