0

I am deploying node js API on google App Engine and API is working fine on my local machine but when I run gcloud app deploy command, I am getting following error

Cannot find module './src/routes/classes.js' . I am using below configuration in app.yaml

runtime: nodejs
env: flex

and getting error on following API line code.

const class_Router =require('./src/routes/classes.js') ;   

can any one help on this issue ? everything works fine on local but getting this error while deployment. Do I need some configuration in my app.yaml file ?

Joan Grau Noël
  • 3,084
  • 12
  • 21
  • What version of the Cloud SDK are you using? As well, if you are using `npm` to manage the modules of your application, maybe [this answer](https://stackoverflow.com/a/38417065/10561875) would solve the issue. – Joan Grau Noël Apr 02 '19 at 09:52
  • I am using Google Cloud SDK 240.0.0 beta 2019.02.22 bq 2.0.42 core 2019.03.22 gsutil 4.37 – Lakshman Singh Bhagrot Apr 02 '19 at 10:54
  • Can you try adding your local dependencies in the `npm` `package.json` file, as in [this answer](https://stackoverflow.com/a/38417065/10561875)? – Joan Grau Noël Apr 02 '19 at 13:45

0 Answers0