ymfe / yapi-plugin-qsso Goto Github PK
View Code? Open in Web Editor NEWYApi可视化接口管理平台 qsso 登录插件
YApi可视化接口管理平台 qsso 登录插件
执行:yapi plugin --name yapi-plugin-qsso出错:
npm WARN checkPermissions Missing write access to /data/yapi/vendors/node_modules/isobject/node_modules
npm WARN [email protected] requires a peer of webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^1.4.2 || >=2.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^1 || ^2 || ^2.1.0-beta || ^2.2.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] license should be a valid SPDX license expression
npm ERR! path /data/yapi/vendors/node_modules/cjson
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/data/yapi/vendors/node_modules/cjson'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-07-24T00_42_45_088Z-debug.log
更新插件成功
正在安装依赖...
^C
const handleLogin = () => {
const loginURI = '/api/user/login_by_token';
const { AUTH_SERVER } = options;
let ret = qualifyURL(loginURI, true);
let redirectURL = AUTH_SERVER + '?ret=' + ret;
location.href = redirectURL;
}
中不应该取AUTH_SERVER,应该取loginUrl
下面的才是正确滴
const loginURI = '/api/user/login_by_token';
const { loginUrl } = options;
let ret = qualifyURL(loginURI, true);
let redirectURL = loginUrl + '?redirectUrl=' + ret;
location.href = redirectURL;
同理 server.js 中
request(loginUrl + token, function (error, response, body) {
loginUrl 也错了,应该是AUTH_SERVER
[error] D:/nodejs/node_global//ykit//buffer/index.js
Module build failed: ReferenceError: Unknown plugin "transform-runtime" specified in "base" at 0, attempted to resolve relative to "D:\nodejs\node_global\node_modules\ykit\node_modules\buffer"
at D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-core\lib\transformation\file\options\option-manager.js:180:17
at Array.map ()
at Function.normalisePlugins (D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
at OptionManager.init (D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-core\lib\transformation\file\index.js:212:65)
at new File (D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-core\lib\transformation\file\index.js:135:24)
at Pipeline.transform (D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-core\lib\transformation\pipeline.js:46:16)
at transpile (D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-loader\lib\index.js:46:20)
at D:\nodejs\node_global\my-yapi\vendors\node_modules\babel-loader\lib\fs-cache.js:79:18
@ ./~/btoa/index.js 1:0-71
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.