n4bb12 / verdaccio-github-oauth-ui

📦🔐 GitHub OAuth plugin for Verdaccio
https://verdaccio.org
MIT License
74 stars 45 forks source link

Running `npm run dev` doesn't seem to properly set up local development #156

Closed hybridherbst closed 2 years ago

hybridherbst commented 2 years ago

Bug Report

I was trying to run npm run dev locally to test changes to the plugin. However, it seems that doesn't work anymore- seems the plugin is loaded (I can see that in the terminal), but the actual deployment file isn't found and thus while Verdaccio works, the OAuth UI doesn't: image

Terminal output looks ok: image

So I can only assume that some of the copy steps aren't correct anymore maybe? Are there additional steps for local development?

Suggested implementation

Would be great if there are steps listed in the Readme for setting up local development.

n4bb12 commented 2 years ago

Might be related to npm. I did yarn && yarn dev and got this.

2022-05-10 19_25_53-Verdaccio

If you're using npm there is no lockfile, so you might end up with an incompatible set of dependencies, potentially a new verdaccio version with changes that break the plugin.

hybridherbst commented 2 years ago

According to package.json npm run dev simply calls yarn && yarn dev. I tried it nonetheless but get the same behaviour. I'll try to start "from scratch" but not sure what exactly could have gone wrong, this was a fresh clone anyways. I'll keep you posted!

n4bb12 commented 2 years ago

According to package.json npm run dev simply calls yarn && yarn dev.

I'm seeing this

2022-05-24 21_33_43-verdaccio-github-oauth-ui_package json at master · n4bb12_verdaccio-github-oauth

No idea why that would have a different effect on your system. I could only suspect different yarn/node versions or a different git revision/local changes.

I'll have to close this because I can't reproduce it.

n4bb12 commented 2 years ago

Feel free to post a PR or comment if you come across a solution or find out more about what might be causing this.

n4bb12 commented 2 years ago

I ran a dependency update as part of project maintenance and then ran into the same issue. So I'm infering that you didn't use yarn to install dependencies and hence the yarn lock file, but instead installed with npm which ignores the yarn.lock. Then you get the latest dependencies matching the semver ranges, which is not what the yarn lock file contains and is not tested to work.

Please try deleting node_modules and then run yarn && yarn dev exactly like that.