yapi YApi 安装出现问题请看这里

9rbhqvlz  于 2021-11-29  发布在  Java
关注(0)|答案(52)|浏览(1886)
  1. 确保 node 版本=> 7.6,请运行 node -v 查看版本号
  2. 确保 mongodb 版本 => 2.6,请运行 mongo --version 查看版本号
  3. 确保安装了 npm, 运行 npm -v 查看版本号
  4. 确保安装了 git,运行 git --version 查看版本号
  5. 确保安装了 node-gyp 环境,配置方法

确认版本号没问题,请删除原有的安装文件和数据库,重新安装。

如果安装了 yapi-cli 工具,执行 yapi server 找不到命令,可尝试执行 yapi-cli server

如果是使用了yapi server 可视化部署出的问题,可查看下文档-> 内网部署方式,熟悉 docker 童鞋可以使用 docker 部署,docker 部署的教程可以在 https://github.com/YMFE/yapi 这里找到。

如果还是无法安装,请不要选择最新的版本,可选择上一个版本或上上一个版本等,最新版本出问题的概率会比较大。

有问题请在下面留言,感谢大家的反馈。

vx6bjr1n

vx6bjr1n16#

当启动时候,访问地址时候就显示空白,然后就允运行出错

当前node:v8.12.0
npm:6.4.1
mongoDB:mongo:4.4

~~~
log: -------------------------------------swaggerSyncUtils constructor-----------------------------------------------
log: 服务已启动,请打开下面链接访问:
http://127.0.0.1:3000/
log: mongodb load success...

Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:868:14)

Error: write ECONNRESET
at WriteWrap.afterWrite [as oncomplete] (net.js:868:14)
~~~

sulc1iza

sulc1iza17#

必须顶你,我用yapi server出错无数次,你的方法一次成功
环境:

node: v14.17.2
MongoDB: v4.4.6
uoifb46i

uoifb46i18#

找到问题根源所在,解决问题方式
chmod -R 777 /var/lib/nginx/proxy

bpsygsoo

bpsygsoo19#

npm fund 执行显示 yapi-vendor@1.10.0,yapi执行显示1.10.1,登录后台后显示请升级,后台功能都不正常了
。。。。。。。。已经升级到最新,还要提示我升级。。。。。。。

zzzyeukh

zzzyeukh20#

为什么会出现你们的内网域名啊 https://repo.corp.qunar.com

bgtovc5b

bgtovc5b21#

我把nodejs换成低版本(v10.19.0)的就可以了

7kjnsjlb

7kjnsjlb22#

[root@dev-infra ~]# yapi server
在浏览器打开 http://0.0.0.0:9090 访问。非本地服务器,请将 0.0.0.0 替换成指定的域名或ip
(node:19879) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:19879) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:19879) Warning: Accessing non-existent property 'which' of module exports inside circular dependency

你们做的东西是认真的么?血压都上来了,一运行就报一堆这个,点击页面部署一直转圈,然后啥也没有?
能严肃点么。。。错误日志呢?

[root@dev-infra ~]# node -v
v14.18.1

[root@dev-infra ~]# mongo version
MongoDB shell version v5.0.3
connecting to: mongodb://127.0.0.1:27017/version?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("45f7c1ef-a1c7-4014-8640-b69e31460d1d") }
MongoDB server version: 5.0.3

[root@dev-infra ~]# git version
git version 1.8.3.1

[root@dev-infra ~]# node-gyp -v
v8.4.0

64jmpszr

64jmpszr24#

yapi版本:1.10.2
node.js: v16.13.0
npm: 8.1.0
使用npm install --production --registry https://registry.npm.taobao.org 安装时报如下错误
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/dify/download/dify-1.0.5.tgz failed, reason: connect ETIMEDOUT 10.66.160.10:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

x3naxklr

x3naxklr25#

yapi版本:1.10.2
npm install 报错
http://npmrepo.corp.qunar.com/tslib/-/tslib-1.8.0.tgz 这个地址访问不了

npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://npmrepo.corp.qunar.com/tslib/-/tslib-1.8.0.tgz failed, reason: connect ETIMEDOUT 10.66.160.10:80
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

vnjpjtjt

vnjpjtjt26#

尝试换到taobao的试试

3b6akqbq

3b6akqbq27#

@ChaNHHHHH 警告错误,不用管

gcxthw6b

gcxthw6b28#

@darkless456 我这边是这样配置的

location / {
            proxy_http_version 1.1;
	    proxy_set_header Upgrade $http_upgrade;
	    proxy_set_header Connection "upgrade";
            proxy_pass   http://127.0.0.1:3011;
    }
3z6pesqy

3z6pesqy29#

博主, 我使用的是内网部署方式2,部署到自己服务器上,在进行npm run install-server时,会报

error: MongoError: auth failed, mongodb Authentication failed
error: MongoError: auth failedmongodb connect error

根据官网 centos 环境搭建的基础环境,连接mongo 还会报错这是什么原因?

oprakyz7

oprakyz730#

@darkless456 你好,想问你下,你内网部署成功了嘛?

相关问题