My latest Google Cloud Builds are failing with the following error:
Step 3/16 : RUN npm i
---> Running in 9b3b8df05c12
npm notice
npm notice New patch version of npm available! 7.0.2 -> 7.0.3
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.3>
npm notice Run `npm install -g [email protected]` to update!
npm notice
npm ERR! Maximum call stack size exceeded
The last successful build was on October 17th. Since then, I have only made one commit which changed some typescript. Nothing in the dockerfile or NPM dependencies has changed.
The relevant section of the Dockerfile looks like this:
FROM node AS minifier
COPY MyProject/Client .
RUN npm i
RUN npm install -g grunt-cli rollup
RUN grunt release
It looks like the issue is specifically with the RUN npm i command. Is this a bug? Is there anything I can do to fix it? I did retry the build, but encountered the same error.
This is an issue caused due to the latest release of npm i.e. v7.0.3. There are multiple alternatives to this:
node:15.0.0 or node:15.0.0-slimyarn instead of npm can also fix this issuenpm cache clean --force before npm i in your DockerfileI'd recommend changing the base image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With