Google cloud error : Cannot find module '/workspace/server.js'

208 Views Asked by At

I'm facing a very common issue on Google cloud after deployment. I'm getting Cannot find module '/workspace/server.js'. In local it's working fine but not on gcloud. Tried lot of solutions from google but not able to get it. Please do provide me if any suggestion to make it work.

Here is my directory and config:

Build directory

enter image description here

Yaml config

runtime: nodejs16 # or another supported version
instance_class: B1
service: adminoper
basic_scaling:
  max_instances: 1
  idle_timeout: 10m

handlers:
- url: /
  static_dir: build

- url: /.*
  secure: always
  redirect_http_response_code: 301
  script: auto

Google cloud error

enter image description here

I got few answers in google to add entrypoint path but that's not working. Please do suggest.

0

There are 0 best solutions below