Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第一次部署失败,在mongo数据库初始化的时候 #12

Open
heping945 opened this issue Jul 3, 2021 · 3 comments
Open

第一次部署失败,在mongo数据库初始化的时候 #12

heping945 opened this issue Jul 3, 2021 · 3 comments

Comments

@heping945
Copy link

`依赖库安装完成,正在初始化数据库mongodb...

yapi-vendor@1.9.2 install-server /my-yapi/vendors > node server/install.js
Error: /my-yapi/vendors/server/utils/commons.js:25 jsf.extend('mock', function () { ^ TypeError: jsf.extend is not a function at Object. (/my-yapi/vendors/server/utils/commons.js:25:5) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/my-yapi/vendors/server/install.js:3:17) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47
`

@yunxiaoyang01
Copy link

@heping945 你好,你的问题解决了吗?我也有这个问题

@dadafrank
Copy link

dadafrank commented Nov 17, 2021

@heping945 你好,你的问题解决了吗?我也有这个问题

不要用他的mongo!!!
首先你将docker-compose.yml里的
mongo: image: mongo:4 restart: always environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: example MONGO_INITDB_DATABASE: yapi volumes: - ./mongo-conf:/docker-entrypoint-initdb.d - ./mongo/etc:/etc/mongo - ./mongo/data/db:/data/db ports: - 27017:27017 healthcheck: test: ["CMD", "netstat -anp | grep 27017"] interval: 2m timeout: 10s retries: 3

depends_on: - mongo
这些都注释掉后保存,然后在你的服务器上自己装个mongodb,启动后mongodb,最后运行docker-compose up开始初始化即可。

@noovertime7
Copy link

我也用到了,换了个版本就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants