webpack --mode production not working

==> Running build command ‘npm install -D webpack-cli && npm run build’…
Oct 10 12:43:13 PM audited 39 packages in 2.879s
Oct 10 12:43:13 PM found 0 vulnerabilities
Oct 10 12:43:13 PM
Oct 10 12:43:13 PM
Oct 10 12:43:13 PM > universal@1.0.0 build /opt/render/project/src
Oct 10 12:43:13 PM > webpack --mode production
Oct 10 12:43:13 PM
Oct 10 12:43:13 PM CLI for webpack must be installed.
Oct 10 12:43:13 PM webpack-cli (GitHub - webpack/webpack-cli: Webpack's Command Line Interface)
Oct 10 12:43:13 PM
Oct 10 12:43:13 PM We will use “npm” to install the CLI via “npm install -D webpack-cli”.
Oct 10 12:43:13 PM Do you want to install ‘webpack-cli’ (yes/no): npm ERR! code ELIFECYCLE
Oct 10 12:43:13 PM npm ERR! errno 1
Oct 10 12:43:13 PM npm ERR! universal@1.0.0 build: webpack --mode production
Oct 10 12:43:13 PM npm ERR! Exit status 1
Oct 10 12:43:13 PM npm ERR!
Oct 10 12:43:13 PM npm ERR! Failed at the universal@1.0.0 build script.
Oct 10 12:43:13 PM npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Oct 10 12:43:13 PM
Oct 10 12:43:13 PM npm ERR! A complete log of this run can be found in:
Oct 10 12:43:13 PM npm ERR! /opt/render/.cache/_logs/2023-10-10T16_43_13_561Z-debug.log
Oct 10 12:43:13 PM ==> Build failed :disappointed:

Hi Ashish,

Could you share the service ID or GitHub repo if it’s public? Feel free to open a support ticket from the dashboard if you don’t want to share this on a public forum.

Regards,

Matt

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