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

K8S部署yapi,通过环境变量替换YAPI_PLUGINS报错 #50

Open
areswxin opened this issue Aug 6, 2020 · 1 comment
Open

K8S部署yapi,通过环境变量替换YAPI_PLUGINS报错 #50

areswxin opened this issue Aug 6, 2020 · 1 comment
Labels
question Further information is requested

Comments

@areswxin
Copy link

areswxin commented Aug 6, 2020

K8S部署yapi,通过环境变量替换YAPI_PLUGINS报错
覆盖其他配置没有问题,YAPI_PLUGINS报错

配置: YAPI_PLUGINS: [{"name":"gitlab","options":{}}]

报错如下:
undefined:1
[map[name:gitlab options:map[]]]
^

SyntaxError: Unexpected token m in JSON at position 1
at JSON.parse ()
at Function.extractConfigFromEnv (/yapi/vendors/start.js:175:40)
at Function.extractConfig (/yapi/vendors/start.js:213:44)
at new Main (/yapi/vendors/start.js:295:36)
at Object. (/yapi/vendors/start.js:370:1)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)

求大佬看下

@fjc0k
Copy link
Owner

fjc0k commented Aug 6, 2020

你试试把 json 用单引号括起来:YAPI_PLUGINS: '[{"name":"gitlab","options":{}}]'

@fjc0k fjc0k added the question Further information is requested label Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants