I am not particularly experienced with either npm or webpack. I have a fairly small project that builds very quickly locally (much less than a minute), yet takes a ridiculously-long time to run on our test server.
in package.json
the code is "scripts": {
"build": "webpack --config webpack.prod.js", ...
Running npm run build
executes very quickly on my local development machine. It uses copy-webpack-plugin as described here to build a directory of static content.
When I attempt to do the same from our test server (after getting exact same files from github), the npm run build
command takes well more than half an hour - if it completes at all before I give up and just manually copy over the relevant files from my local dev.
npm install --verbose
, which worked as quickly as running locally does. I am not familiar with npm ci but will look into it. – Oaxaca