问题
I am trying to launch a gcloud app engine using an example in fast-ai with a model that i developped https://github.com/imiled/google-app-engine and followed the instructions in the fastai web page https://course.fast.ai/deployment_google_app_engine.html
but it does not seem to work it raises the following error when i go to the page:
Error: Server Error The server encountered an error and could not complete your request. Please try again in 30 seconds.
here is the log that i got from the console:
miledismael@cloudshell:~/google-app-engine (classification-276710)$ gcloud app browse
Did not detect your browser. Go to this link to view your app:
https://classification-276710.ew.r.appspot.com
miledismael@cloudshell:~/google-app-engine (classification-276710)$ gcloud app logs tail -s default
Waiting for new log entries...
2020-05-11 22:16:26 default[20200512t001309] "GET / HTTP/1.1" 500
2020-05-11 22:16:28 default[20200512t001309] internal/modules/cjs/loader.js:983
2020-05-11 22:16:28 default[20200512t001309] throw err;
2020-05-11 22:16:28 default[20200512t001309] ^
2020-05-11 22:16:28 default[20200512t001309]
2020-05-11 22:16:28 default[20200512t001309] Error: Cannot find module '/workspace/server.js' at Funct
ion.Module._resolveFilename (internal/modules/cjs/loader.js:980:15) at Function.Module._load (internal/
modules/cjs/loader.js:862:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main
.js:74:12) at internal/main/run_main_module.js:18:47 {
2020-05-11 22:16:28 default[20200512t001309] code: 'MODULE_NOT_FOUND',
2020-05-11 22:16:28 default[20200512t001309] requireStack: []
2020-05-11 22:16:28 default[20200512t001309] }
If anybody could help that would be great thanks
回答1:
There are 2 problems with your app right now:
It does not have all the correct requirements described on
requirements.txtinstalled, try installing it again by runningcat requirements.txt | xargs npm install -gAs per your mention on the comments, your app needs more resources in the container it's running on, so you should add that to your
app.yamlconfiguration as described on this documentation
来源:https://stackoverflow.com/questions/61740611/could-not-find-module-workspace-server-js