yapi启动失败
来源:20-3 yapi的安装和配置

尼克2018
2021-02-06
报错信息:
yapi_1 | internal/modules/cjs/loader.js:818
yapi_1 | throw err;
yapi_1 | ^
yapi_1 |
yapi_1 | Error: Cannot find module '/my-yapi/vendors/server/app.js’
yapi_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
yapi_1 | at Function.Module._load (internal/modules/cjs/loader.js:667:27)
yapi_1 | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
yapi_1 | at internal/main/run_main_module.js:17:47 {
yapi_1 | code: ‘MODULE_NOT_FOUND’,
yapi_1 | requireStack: []
yapi_1 | }
看了其他同学的提问,我查看了下yml文件
image: yapi
# 第一次启动使用
# command: "yapi server"
# 之后使用下面的命令
command: "node /my-yapi/vendors/server/app.js"
并安装了 npm install -g yapi-cli
执行:yapi server
执行完还是不行。。
1回答
-
尼克2018
提问者
2021-02-06
问题已解决,处理步骤如下:
1.路径:vim root/dokcer-yapi/docker-compose.yml2. 去掉#号 command: "yapi server",
3.给命令 command: "node /my-yapi/vendors/server/app.js" 这个前面加#号
3.再去执行:docker-compose up
4.访问IP:9090
5.设置完成后页面信息后,再按照老师的教程继续
742023-03-21
相似问题