`plugin not found` with version 2.3.1
lauraseidler opened this issue ยท 6 comments
Bug Report
Versions
Version | |
---|---|
verdaccio | 4.7.2 |
verdaccio-github-oauth-ui | 2.3.1 |
Expected behavior
Verdaccio starts up with the plugin enabled.
Observed behaviour
Verdaccio crashes on startup because the plugin cannot be found.
Steps to reproduce
- Install verdaccio and this plugin in version 2.3.1
- Configure verdaccio to use the plugin
- Start verdaccio
- Error:
plugin not found. try npm install verdaccio-github-oauth-ui
If instead version 2.3.0 or below is installed, there is no issue.
Additional context
You can use the following minimal Dockerfile and config.yaml to reproduce the problem.
FROM verdaccio/verdaccio:4.7.2
USER root
RUN yarn add verdaccio-github-oauth-ui@2.3.1 # 2.3.0 works fine
COPY config.yaml /verdaccio/conf/config.yaml
USER verdaccio
storage: /verdaccio/storage/data
plugins: /verdaccio/plugins
web:
title: Verdaccio
packages:
'**':
access: $all
publish: $authenticated
unpublish: $authenticated
middlewares:
github-oauth-ui:
enabled: true
Thanks for the detailed description ๐
I tried running Verdaccio with your config and got this error instead:
error loading a plugin github-oauth-ui: Error: "auth.github-oauth-ui" must be enabled
This block seems to be missing in your config but it is required for the plugin to be able to work
auth:
github-oauth-ui:
org: GITHUB_ORG
client-id: GITHUB_CLIENT_ID
client-secret: GITHUB_CLIENT_SECRET
Could you have a look if you have this in your real config, since it's missing in the issue description?
Yeah I have this in the real config - I removed everything from the config that still got me the plugin not found
error on initial startup - full config looks like this (minus comments and private package configuration):
---
storage: /verdaccio/storage/data
plugins: /verdaccio/plugins
web:
title: Verdaccio
auth:
htpasswd:
file: /verdaccio/storage/htpasswd
github-oauth-ui:
org: GITHUB_ORG
client-id: GITHUB_CLIENT_ID
client-secret: GITHUB_CLIENT_SECRET
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
"**":
access: $authenticated
publish: $authenticated
unpublish: $authenticated
proxy: npmjs
middlewares:
audit:
enabled: true
github-oauth-ui:
enabled: GITHUB_ENABLED
logs:
- { type: stdout, format: pretty, level: http }
Ah, I had replaced some custom code for query-string and placed it in dev-dependencies instead of dependencies. This prevented the plugin from loading.
Fixed in https://github.com/n4bb12/verdaccio-github-oauth-ui/releases/tag/2.3.2
Thanks again for reporting and for the good info ๐
Fantastic, thanks for the quick fix!