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

google cloud build failed missing dependencies

[build log](https://drive.google.com/file/d/1npvnbH85GrFXR8F0HkNEKzTOgU3md8Ox/view?usp=sharing)

Step #2 - "build": Running "npm ci --quiet (NODE_ENV=production)"
Step #2 - "build": npm ERR! code EUSAGE
Step #2 - "build": npm ERR! 
Step #2 - "build": npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

github project

I'm trying using Google Cloud Service to deploy gcloud app deploy my experss app for my website but when deploy the build fail

Installations:

node.js 18.17.0

gcloud: Google Cloud SDK 440.0.0 bq 2.0.94 core 2023.07.21 gcloud-crc32c 1.0.0 gsutil 5.25

I have tried deleting package-lock.json and node_modules directory run npm install and npm ci and it didn't change the result. when running node app.js on my pc its apper to work in http://localhost:3000/stores/store1

also I tried using Firebase Cloud Functions and got the same result (missing dependencies)



 

0 1 2,118
1 REPLY 1

Hi @yaniva,

Welcome to the Google Cloud Community!

The first thing I noticed is that in your Github Repository, the node version is 18.16.1 while you said that you installed node.js 18.17.0.

Perhaps you are getting this error because your local is using an older version of node.

To fix this, you can try the following steps:

  1. Try changing your node version in package.json into 18.17.0
  2. Delete your node_modules and package_lock.json
  3. Clean npm cache with npm cache clean -force
  4. reinstall them using npm install
  5. Try running it all again by using npm ci

If the above options don't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!