-
Since I need to add some custom files in app/data, I need to include some other packages in my node app (package.json) that only lives in /app/code. But it is always overwritten after a restart so my question is how to persist the new packages in my package.json? What tricks are possible?
-
@devtron Is this a custom app? Or some app from the App Store ?
-
N nebulon marked this topic as a question on
-
Which app is this then? Custom node_modules have to be supported by the app or the package
-
I guess this is related to https://forum.cloudron.io/topic/9129/how-to-install-npm-packages-in-your-app/3 .
mm, so far , we haven't found a good way to do this. You want to install custom node modules for your extension, correct ?
-
@devtron I don't know much about Directus extensions. But it looks like say https://github.com/dimitrov-adrian/directus-extension-searchsync is an extension ? Each extension has a package.json of it's own.
(If the above is correct...)
- You can then npm install in the extension's subdirectory
- Then, in
/app/data/env.shjust addexport NODE_PATH=/app/data/extensions/myext/node_modulesand restart the app.
Would something like above work? NODE_PATH sets the search directory for node modules. You can even set multiple paths separated by colon.
-
D devtron has marked this topic as solved on
-
Documented here - https://docs.cloudron.io/apps/directus/#custom-modules
-
G girish forked this topic on
-
G girish locked this topic on
-
G girish moved this topic from Support on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
