n4bb12 / verdaccio-github-oauth-ui

šŸ“¦šŸ” GitHub OAuth plugin for Verdaccio
https://verdaccio.org
MIT License
74 stars 45 forks source link

TypeError with verdaccio versions > 5.19.1 #173

Closed bennetrr closed 1 year ago

bennetrr commented 1 year ago

Bug Report

Versions

Version
Verdaccio > 5.19.1
This plugin 6.0.0
Node 16

Observed behavior

When I try to login with this plugin, I just get a 500 error in the browser and following exception in the container output:

[github-oauth-ui] TypeError: $133VM$verdacciobuildlibutils.getPublicUrl is not a function
 error--- unexpected error: $133VM$verdacciobuildlibutils.getPublicUrl is not a function
TypeError: $133VM$verdacciobuildlibutils.getPublicUrl is not a function
    at $30e365c61300843e$export$dcc64a48664bd665.getRedirectUrl (/app/node_modules/verdaccio-github-oauth-ui/dist/server/index.js:216:55)
    at authorize (/app/node_modules/verdaccio-github-oauth-ui/dist/server/index.js:173:42)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:144:13)
    at Route.dispatch (/app/node_modules/express/lib/router/route.js:114:3)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at /app/node_modules/express/lib/router/index.js:284:15
    at param (/app/node_modules/express/lib/router/index.js:365:14)
    at param (/app/node_modules/express/lib/router/index.js:376:14)
    at Function.process_params (/app/node_modules/express/lib/router/index.js:421:3)
 http --- 500, user: null(172.17.0.1), req: 'GET /-/oauth/authorize', error: internal server error

Steps to reproduce

NielsCorneille commented 1 year ago

Likely needs yarn add @verdaccio/url and import { getPublicUrl } from '@verdaccio/url'; instead of the current import

juanpicado commented 1 year ago

The module can be use (already used in v5) but :) reminder is alpha and keep watching future updates

n4bb12 commented 1 year ago

https://github.com/n4bb12/verdaccio-github-oauth-ui/releases/tag/6.0.1