找不到模块workspace / server.js

编程入门 行业动态 更新时间:2024-10-09 12:25:27

<a href=https://www.elefans.com/category/jswz/34/1771416.html style=找不到模块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

本文发布于:2024-05-07 20:15:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1757065.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   模块   workspace   server   js

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!