Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error deploying node.js project to app-engine

We have been doing daily deployments to app-engine for quite some time.  We were attempting to deploy some tested code to our production environment that we had deployed to our QA environment earlier today, but now we are encountering build failures when attempting to  deploy the same code to both environments.

know1nos_0-1685587273174.png

I have double checked all of our google cloud billing which appears to be in order and was the #1 response on stack overflow.  Is anyone else encountering these issues or have an idea of what might be causing this? Our node version has not been changed within the last few months, we are currently running nodejs16.

Solved Solved
2 4 1,882
1 ACCEPTED SOLUTION

Follow up in case anyone else runs into this issue.  It appears that google cloud has been updated to run npm version 9.7.0 which has a warning indicating that there are known issues and should not be installed globally.  We were able to get around the issue by forcing a specific npm version (8.19.4) that correlated directly with node version 16.20.0.

View solution in original post

4 REPLIES 4

Follow up in case anyone else runs into this issue.  It appears that google cloud has been updated to run npm version 9.7.0 which has a warning indicating that there are known issues and should not be installed globally.  We were able to get around the issue by forcing a specific npm version (8.19.4) that correlated directly with node version 16.20.0.

We're running into this issue as well, how did you force the build to use a specific npm version?

In your package.json file you should be able to set it in the "engines" section:

know1nos_0-1685646787798.png

We were allowing for the build to use our version or higher so we had alter it to use a specific version:

know1nos_1-1685646908938.png

 

We had npm at ~9 so GCP used 9.7.0, trying 9.6 and 9.6.6 both resulted in GCP using 9.6.7 but that builds fine so we went with it.

Thank you for your help!