Hi,
I’m currently attempting to install a custom plugin that the size of my plugin.json is about 154kb, but I encountered the following error:
info: ::ffff:172.18.0.8 - - [08/Feb/2024:07:26:19 +0000] "PUT /plugins/?name=dashboard HTTP/1.0" 413 144 "http://localhost/admin/plugins" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
PayloadTooLargeError: request entity too large
at readStream (/app/node_modules/express/node_modules/raw-body/index.js:155:17)
at getRawBody (/app/node_modules/express/node_modules/raw-body/index.js:108:12)
at read (/app/node_modules/express/node_modules/body-parser/lib/read.js:77:3)
at jsonParser (/app/node_modules/express/node_modules/body-parser/lib/types/json.js:134:5)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at urlencodedParser (/app/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js:100:7)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at nocache (/app/node_modules/nocache/index.js:8:5)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at internalNext (/app/node_modules/helmet/index.js:45:33)
at xXssProtection (/app/node_modules/x-xss-protection/index.js:26:7)
at internalNext (/app/node_modules/helmet/index.js:49:7)
at nosniff (/app/node_modules/dont-sniff-mimetype/index.js:4:5)
at internalNext (/app/node_modules/helmet/index.js:49:7)
at ienoopen (/app/node_modules/ienoopen/index.js:4:5)
at internalNext (/app/node_modules/helmet/index.js:49:7)
at hsts (/app/node_modules/hsts/index.js:42:5)
at internalNext (/app/node_modules/helmet/index.js:49:7)
at hidePoweredBy (/app/node_modules/hide-powered-by/index.js:12:7)
at internalNext (/app/node_modules/helmet/index.js:49:7)
at frameguard (/app/node_modules/frameguard/index.js:38:5)
at internalNext (/app/node_modules/helmet/index.js:49:7)
at dnsPrefetchControl (/app/node_modules/dns-prefetch-control/index.js:10:7)
at internalNext (/app/node_modules/helmet/index.js:49:7)
at helmet (/app/node_modules/helmet/index.js:52:5)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
at /app/node_modules/express/lib/router/index.js:284:7
Here’s the version information for my HollaEx setup:
HollaEx CLI : v2.9.0.
HollaEx Kit : v2.9.3.
Made with <3 by bitHolla Inc.
To address this issue, I’ve already added the client_max_body_size 20m;
configuration in the http
section of hollaex-kit/templates/local/nginx/nginx.conf
.
Additionally, I’ve included the following configurations in my plugin’s script.js
:
app.use(express.json({ limit: "6mb" }));
app.use(express.urlencoded({ limit: "6mb", extended: true }));
Despite these adjustments, the error persists. Could you please provide guidance on resolving this issue? Any assistance would be greatly appreciated.