[英]could not find module workspace/server.js
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我正在尝试使用 fast-ai 中的示例启动 gcloud 应用引擎,其中包含我开发的88361633527088://github.com/imiled/google-app-engine并按照 fastai web 页面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:但它似乎不起作用,当我 go 到页面时它会引发以下错误:
Error: Server Error The server encountered an error and could not complete your request.错误:服务器错误 服务器遇到错误,无法完成您的请求。 Please try again in 30 seconds.
请在 30 秒后重试。
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如果有人可以提供帮助,那将是非常感谢
There are 2 problems with your app right now:您的应用目前存在 2 个问题:
It does not have all the correct requirements described on requirements.txt
installed, try installing it again by running cat requirements.txt | xargs npm install -g
它没有安装
requirements.txt
中描述的所有正确要求,尝试通过运行cat requirements.txt | xargs npm install -g
再次安装它。 cat requirements.txt | xargs npm install -g
As 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.yaml
configuration as described on this documentation根据您在评论中提到的,您的应用程序在其运行的容器中需要更多资源,因此您应该按照本文档中的描述将其添加到您的
app.yaml
配置中
Don't include package-lock.json in the folder.不要在文件夹中包含 package-lock.json。 Possibly that's it
可能就是这样
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.