Get error when deploy nodejs app to App Engine : Can not read property "package_name" of undefined

this morning, I tried to deploy my nodejs App (version 18.6) to GCP App Engine. I got error : Can not read property “bcryptjs” of undefined.

I can not understand why “bcryptjs” is a property of something?? This app works fine on localhost.

My app has run on GCP for years and I have deployed hundreds of time. But this is the first time I get an error like this.

Please support my case.

Hi @ThangXD ,

Welcome to Google Cloud Community!

There are several reasons you receive this error:

  • Runtime may be incorrectly defined in either yourapp.yamlfile, e.g.:

    •   runtime: nodejs18
      
  • If you specify an incompatible Node.js version in your package.json file, your deployment will fail with an error message. Please check this Node.js Runtime Environment for reference.

  • Modules may be incorrectly defined in your package.json. Please make sure to check for misspelled modules or missing quotation marks.

Hope this helps.