Render.com does not know how to install webpack

Webpack is widely used and without shell access for free plans, webpack is just borked.
Trying to build with webpack --config webpack.config.js --mode=production just results in

Oct 14 05:01:03 AM  > webpack --config webpack.config.js  --mode=production
Oct 14 05:01:03 AM  
Oct 14 05:01:03 AM  CLI for webpack must be installed.
Oct 14 05:01:03 AM    webpack-cli (https://github.com/webpack/webpack-cli)
Oct 14 05:01:03 AM  
Oct 14 05:01:03 AM  We will use "npm" to install the CLI via "npm install -D webpack-cli".
Oct 14 05:01:03 AM  Do you want to install 'webpack-cli' (yes/no): ==> Build failed 😞

as it does not know what to do when webpack asks for permission to install.
How do I install webpack if I can’t use the shell?

Hi there,

Thanks for reaching out.

From what you’ve shared, it sounds like you may not be installing your dependencies first. A typical Node project Build Command would be something like npm install; npm run build (or the yarn equivalents if that’s your package manager of choice).

If that doesn’t help, please share some more details that may help us troubleshoot it with you, e.g. any further logs/errors/output, service ID, reproduction steps, etc. If you don’t want to share these details on the community forum, please feel free to raise a ticket with support@render.com

Thanks

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.