yapi部署最后一步:点击开始部署后初始化mongodb失败
来源:20-3 yapi的安装和配置

starrysky1986
2021-07-07
点击开始部署后初始化mongodb失败
yapi_1 | 依赖库安装完成,正在初始化数据库mongodb...
yapi_1 |
yapi_1 | > yapi-vendor@1.9.2 install-server /my-yapi/vendors
yapi_1 | > node server/install.js
yapi_1 |
yapi_1 |
yapi_1 | Error: /my-yapi/vendors/server/utils/commons.js:25
yapi_1 | jsf.extend('mock', function () {
yapi_1 | ^
yapi_1 |
yapi_1 | TypeError: jsf.extend is not a function
yapi_1 | at Object.<anonymous> (/my-yapi/vendors/server/utils/commons.js:25:5)
yapi_1 | at Module._compile (internal/modules/cjs/loader.js:999:30)
yapi_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
yapi_1 | at Module.load (internal/modules/cjs/loader.js:863:32)
yapi_1 | at Function.Module._load (internal/modules/cjs/loader.js:708:14)
yapi_1 | at Module.require (internal/modules/cjs/loader.js:887:19)
yapi_1 | at require (internal/modules/cjs/helpers.js:74:18)
yapi_1 | at Object.<anonymous> (/my-yapi/vendors/server/install.js:3:17)
yapi_1 | at Module._compile (internal/modules/cjs/loader.js:999:30)
yapi_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
yapi_1 | at Module.load (internal/modules/cjs/loader.js:863:32)
yapi_1 | at Function.Module._load (internal/modules/cjs/loader.js:708:14)
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
nodejs 版本 v16.4.2
写回答
2回答
-
starrysky1986
提问者
2021-11-04
找到解决方法了
https://www.cnblogs.com/dongv5/p/14990289.html
(1)打开
/root/my-yapi/vendors/server/utils/commons.js
文件,将所谓的jsf.extend
给注释掉。$ cd /root/my-yapi/vendors/server/utils/ # 进入utils目录 $ vi commons.js # 编辑common.js
屏蔽掉这段代码就行了
012021-11-08 -
bobby
2021-07-08
你可以留下qq 我加你看看
022021-07-16
相似问题