Back

Inquiry - Deploy nodejs function with node_modules due to custom code/branch

  • 0
  • Functions
TernaryBash
15 Apr, 2023, 22:21

Hey all, I keep reading to not deploy a nodejs application with the node moduiles. Issue is that I have code written in the module to extend it. I do not want to make make it public and deploy to npm. Will this be a problem? Would removing the package.json file solve this?

TL;DR
User is asking if it's possible to deploy a Node.js function with node_modules due to custom code or branch. They mention that they've read that it's not recommended to deploy a Node.js application with node_modules, but they have custom code written in the module that they don't want to make public. They ask if removing the package.json file would solve the problem. Solution: Another user responds saying that while it's generally recommended to not include node_modules in the deployment, they can include it in their node_modules folder. However, they may need to deploy manually because the CLI tries to ignore node_modules.
Drake
15 Apr, 2023, 23:52

You can include it in your node modules, but you may need to deploy manually because the CLI tries to ignore node modules

TernaryBash
15 Apr, 2023, 23:54

Interesting. Good to know. Thank you Steven.

TernaryBash
15 Apr, 2023, 23:54

[SOLVED]

TernaryBash
15 Apr, 2023, 23:56

Oh, last thing. I see the block in the docs for functions and I see the manual deployment. So I have to do a manual deployment through the console, or can I also do it through the CLI?

Drake
15 Apr, 2023, 23:57

I don't think you can use the CLI. Or maybe if you don't put node_modules in the git ignore

TernaryBash
15 Apr, 2023, 23:58

<:appwritecheck:851487062112731146> Gotcha. I'll give it a shot. Thanks for the idea.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more