I have downloaded Expressjs sample application from the repository https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/express
then deployed using
gcloud app deploy
Process continued and after some time it is giving below error
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
> [email protected] start /app
> node ./bin/www
module.js:471
throw err;
^
Error: Cannot find module '/app/bin/www'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/nodejs/bin/node" "/nodejs/bin/npm" "start"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node ./bin/www'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the appengine-express package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs appengine-express
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls appengine-express
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/npm-debug.log
I am able to see a version created in app engine dashboard but failing to start application.
I tried to deploy other sample from the same repo https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/hello-world everything works fine.
What I observe from two samples is when node tries to import file from parent folder like below it is failing to start
.....
const app = require('../app');
.....
What is the issue here and am I missing anything?