Help Reducing Size of Node_modules

Hello, I got mail saying I have exceeded the Bus Logic deployment size for my plan. I understand the problem, and my node_modules tree is huge. I am going to try to trim it, but it is going to take days to figure out what can be excluded. I’ve read everything I can find regarding deployment, including this 2 mb script deployment limit - #2 by vitaly-vengrov and this Troubleshooting - Developing Backendless Server Code with node.js and have a few questions.

  1. The warning email says review the usage of the feature in the console. Where do you review “Business Logic deployment size”? I can’t find it anywhere in my project usage stats.

  2. The mail says I can by a “Business Logic deployment size” function pack in the Market place, which I would gladly do to buy more time. But I searched the marketplace and see no such thing.

  3. As suggested in the links above I ran

         npm run deploy -- --verbose --keep-zip

to get an idea of what coderunner is uploading. I see nothing in the verbose output that pertains, and the zip file is nowhere to be found. Is there a newer way to specify keeping the zip?

  1. Has the app.exclude key in the coderunner.json file replaced the documented app.files key? Is it the correct place to start building a list of unneeded files? Is the syntax for wildcard exclusions documented somewhere?

  2. If there IS a deployment size function pack and I apply it, then am successful at whittling the node_modules down to size, can I remove the function pack and save my employer a few bucks?

Thank you,

Kelly

Hi.

(1)
Go to:
Manage → Billing → show usage and charges
in order to see current size of BL code.

(2)
Go to Marketplace → MBAAS function packs → Enhanced Hosted Service Size (20 MB)

(5)
The pack costs $10/month and you may delete it when it is no needed anymore.

I asked my colleague to answer the third and fourth questions.

Hello @Kelly_Oglesby

  1. could you please share what you can see when you run the command?
    Also, there is another option to confirm the zip size before uploading it to the server, try the following:
    npm run deploy -- --verbose --keep-zip --zip-size-confirmation
    1. Has the app.exclude key in the coderunner.json file replaced the documented app.files key? Is it the correct place to start building a list of unneeded files? Is the syntax for wildcard exclusions documented somewhere?

Seems, it has, you should use app.exclude in order to exclude files from the zip.
You can find examples here GitHub - isaacs/node-glob: glob functionality for node.js