1
votes

I am trying to host this https://github.com/idiidk/kahoot-tools on google cloud. It works when i test it in cloud shell but when i deploy it it crashes. I see this error when i go to my app:

Error: Server Error The server encountered an error and could not complete your request. Please try again in 30 seconds.

In google cloud i see this error:

Error: Cannot find module 'express' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/srv/kahoot-tools.js:8:21) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3)

1

1 Answers

1
votes

express package is missing in "dependencies" of package.json. just add the following:

"express": "^4.16.3"

and also add this node for deploying to App Engine, otherwise dependencies won't get installed:

"scripts": {
    "start": "node kahoot-tools.js"
  }