RUN npm cache clean -f \
&& npm config delete proxy \
&& npm config delete https-proxy \
&& npm config delete proxy -g \
&& npm config delete https-proxy -g \
&& npm config set proxy null \
&& npm config set https-proxy null \
&& npm config set fetch-retries 15 \
&& npm config set fetch-retry-factor 30 \
&& npm config set fetch-retry-mintimeout 6000000 \
&& npm config set fetch-retry-maxtimeout 12000000 \
&& npm config set fetch-timeout 30000000 \
&& npm config set maxsockets 30 \
&& npm config set metrics-registry "http://registry.npmjs.org" \
&& npm config set prefer-offline true \
&& npm config set unsafe-perm true \
&& npm config set strict-ssl false \
&& npm config set audit false \
&& npm i -g --unsafe-perm \
&& npm i npm -g \
&& npm i node-gyp -g \
&& npm i @xpack-dev-tools/windows-build-tools@latest -g
RUN rm -rf node_modules \
&& npm i --loglevel verbose --no-audit --legacy-peer-deps \
&& npm run build