找不到模块workspace / server.js"/>
找不到模块workspace / server.js
[我正在尝试使用我开发的模型以Fast-ai中的示例启动gcloud应用引擎://course.fast.ai/deployment_google_app_engine.html
但是它似乎不起作用,当我转到页面时,它会引发以下错误:
错误:服务器错误服务器遇到错误,无法完成您的请求。请在30秒后重试。
这是我从控制台获得的日志:
miledismael@cloudshell:~/google-app-engine (classification-276710)$ gcloud app browse
Did not detect your browser. Go to this link to view your app:
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] }
[如果有人可以帮助,那将是很好谢谢
回答如下:您的应用目前有2个问题:
它没有安装在
requirements.txt
上描述的所有正确要求,请尝试通过运行cat requirements.txt | xargs npm install -g
]再次安装。根据您在评论中的提及,您的应用程序需要在运行它的容器中使用更多资源,因此您应该按照此
app.yaml
]中的描述将其添加到documentation配置中
更多推荐
找不到模块workspace / server.js
发布评论