YMFE / yapi

YApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台
http://yapi.smart-xwork.cn/
Apache License 2.0
27.32k stars 4.78k forks source link

安装报错 #2360

Open 764692390 opened 2 years ago

764692390 commented 2 years ago

版本号

~ [root@test vendors]# node -v v14.17.1 [root@test vendors]# npm -v 6.14.13 [root@test vendors]# MongoDB 4.4.6

什么问题

Error: (node:1057100) Warning: Accessing non-existent property 'count' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) (node:1057100) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency (node:1057100) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency (node:1057100) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency

如何复现此问题

正常安装就能复现

什么浏览器

Google Chrome 版本 93.0.4577.82(正式版本) (x86_64)

什么系统(Linux, Windows, macOS)

CentOS 8.2.2004 x86_64(Py3.7.9) 

通过yapi server报错如下

部署日志 当前安装版本: 1.10.1 (node:1056947) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) (node:1056947) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'find' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'head' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'set' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'test' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'to' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency (node:1056947) Warning: Accessing non-existent property 'which' of module exports inside circular dependency 连接数据库成功! 开始下载平台文件压缩包... http://registry.npm.taobao.org/yapi-vendor/download/yapi-vendor-1.10.1.tgz 部署文件完成,正在安装依赖库... npm WARN deprecated babel@6.23.0: In 6.x, the babel package has been deprecated in favor of babel-cli. Check https://opencollective.com/babel to support the Babel maintainers npm WARN deprecated babel-eslint@7.2.3: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. npm WARN deprecated babel-preset-es2015@6.24.1: ???? Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update! npm WARN deprecated extract-text-webpack-plugin@2.0.0: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin npm WARN deprecated eslint-loader@1.9.0: This loader has been deprecated. Please use eslint-webpack-plugin npm WARN deprecated redux-devtools-dock-monitor@1.2.0: Package moved to @redux-devtools/dock-monitor. npm WARN deprecated redux-devtools@3.7.0: Package moved to @redux-devtools/core. npm WARN deprecated redux-devtools-log-monitor@1.4.0: Package moved to @redux-devtools/log-monitor. npm WARN deprecated validate-commit-msg@2.14.0: Check out CommitLint which provides the same functionality with a more user-focused experience. npm WARN deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm WARN deprecated koa-multer@1.0.2: Please use @koa/multer instead, see https://github.com/koajs/multer npm WARN deprecated request@2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated mkdirp@0.5.3: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated eslint-loader@1.7.1: This loader has been deprecated. Please use eslint-webpack-plugin npm WARN deprecated extract-text-webpack-plugin@2.1.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin npm WARN deprecated html-webpack-plugin@2.29.0: out of support npm WARN deprecated fsevents@1.1.2: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated babel-preset-es2017@6.24.1: ???? Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update! npm WARN deprecated extract-text-webpack-plugin@1.0.1: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() npm WARN deprecated joi@6.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated har-validator@4.2.1: this library is no longer supported npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated querystring@0.2.0: The npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated sw-precache@5.2.1: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw npm WARN deprecated node-pre-gyp@0.6.39: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated ejs@2.3.4: Critical security bugs fixed in 2.5.5 npm WARN deprecated querystring@0.2.1: The npm WARN deprecated topo@1.1.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor. npm WARN deprecated sw-toolbox@3.6.0: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3 npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash. npm WARN deprecated core-js@1.2.7: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

dtrace-provider@0.8.8 install /www/wwwroot/api.jczxw.cn/my-yapi/vendors/node_modules/dtrace-provider > node-gyp rebuild || node suppress-error.js make: Entering directory '/www/wwwroot/api.jczxw.cn/my-yapi/vendors/node_modules/dtrace-provider/build' TOUCH Release/obj.target/DTraceProviderStub.stamp make: Leaving directory '/www/wwwroot/api.jczxw.cn/my-yapi/vendors/node_modules/dtrace-provider/build' core-js@2.6.12 postinstall /www/wwwroot/api.jczxw.cn/my-yapi/vendors/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" core-js-pure@3.18.1 postinstall /www/wwwroot/api.jczxw.cn/my-yapi/vendors/node_modules/core-js-pure > node -e "try{require('./postinstall')}catch(e){}" npm WARN mongoose-auto-increment@5.0.1 requires a peer of mongoose@^4.1.12 but none is installed. You must install peer dependencies yourself. npm WARN moox@1.1.0 requires a peer of react@^17.0.1 but none is installed. You must install peer dependencies yourself. npm WARN moox@1.1.0 requires a peer of react-dom@^17.0.1 but none is installed. You must install peer dependencies yourself. npm WARN moox@1.1.0 requires a peer of react-redux@^7.2.2 but none is installed. You must install peer dependencies yourself. npm WARN moox@1.1.0 requires a peer of redux@^4.0.5 but none is installed. You must install peer dependencies yourself. npm WARN markdown-it-include@1.1.1 requires a peer of markdown-it@>=8.4.2 <11.0.0 but none is installed. You must install peer dependencies yourself. npm WARN redux-devtools-dock-monitor@1.2.0 requires a peer of @types/react@^16.3.18 but none is installed. You must install peer dependencies yourself. npm WARN sass-loader@7.3.1 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-slick@0.15.4 requires a peer of react@^0.14.0 || ^15.0.1 but none is installed. You must install peer dependencies yourself. npm WARN react-slick@0.15.4 requires a peer of react-dom@^0.14.0 || ^15.0.1 but none is installed. You must install peer dependencies yourself. npm WARN react-dock@0.3.0 requires a peer of @types/react@^16.3.18 but none is installed. You must install peer dependencies yourself. npm WARN ws@7.4.6 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself. npm WARN ws@7.4.6 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself. npm WARN slick-carousel@1.8.1 requires a peer of jquery@>=1.8.0 but none is installed. You must install peer dependencies yourself. added 362 packages from 377 contributors in 29.004s 19 packages are looking for funding run npm fund for details 依赖库安装完成,正在初始化数据库mongodb... yapi-vendor@1.10.1 install-server /www/wwwroot/api.jczxw.cn/my-yapi/vendors > node server/install.js Error: (node:1057100) Warning: Accessing non-existent property 'count' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) (node:1057100) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency (node:1057100) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency (node:1057100) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency

ariesly15 commented 2 years ago

目前看来是 mongodb 在 node@14 版本上有问题,尝试降级 node 看能否解决问题 @764692390

tmlx1990 commented 2 years ago

目前看来是 mongodb 在 node@14 版本上有问题,尝试降级 node 看能否解决问题 @764692390

您好 请问1.10.2支持windows二次开发吗?windows npm run dev 启动的时候 显示链接mongodb成功后,就卡住不动了。