membermatters / MemberMatters

An open source membership, access and payments portal for makerspaces and community groups.
https://membermatters.org
MIT License
41 stars 23 forks source link

npm repository 502 #108

Closed kodaxx closed 3 years ago

kodaxx commented 3 years ago

It seems that a repository hosted at npm.hsbne.org is returning 502. This causes npm to fail when installing packages. I cannot get the frontend running for development.

CLI error - 502 Bad Gateway - GET https://npm.hsbne.org/zlib/-/zlib-1.0.5.tgz

jabelone commented 3 years ago

I was running an npm caching proxy for a little while which is what that URL is from. Looks like I forgot to purge the package-lock.json file. I've just pushed up a new version (v2.1.3), can you give it a try now please?

kodaxx commented 3 years ago

Unfortunately I'm still getting the exact same error, and package-lock.json still seems to have the npm.hsbne.org url's in it.

In fact, according to my npm debug.log, every request to any url with the npm.hsbne.org base is returning 502

jabelone commented 3 years ago

Oops, sorry @kodaxx! Looks like my machine had it cached somewhere and kept regenerating it. I've cleared it all out and confirmed that the new package-lock.json doesn't contain any of the incorrect URLs. You should be able to do a git pull and try again. Cheers!

kodaxx commented 3 years ago

Well, it looks like that error is fixed!

However...and maybe I'm just stupid..I'm getting another error with npm saying that I have an incorrect or missing password. npm wants me to login (which I've never done before?)...anyway, so I created an account at npmjs.org and use it to login, but no luck with that.

I've never had any trouble with npm, not sure what the problem is now

jabelone commented 3 years ago

That's a bit strange. Can you share a screenshot or the full error log?

kodaxx commented 3 years ago

2021-03-03T06_42_03_634Z-debug.log

Interestingly enough it looks like a problem with fontawesome - not positive though.

I've done some googling on this error and the consensus is that it's usually related to an expired token, but I'm sure mine is fresh! This is possibly not an error in MemberMatters anymore, and if that is the case this issue can be closed.

I've just never had problems with npm before, nor am I having problems with any other projects - so it's possible that it might be an issue here

jabelone commented 3 years ago

Hi @kodaxx looks like there was a bug with using free font awesome icons. We normally use the pro icons so this was missed. You'll need to pull the latest version and check the new documentation near the top of this page https://membermatters.org/frontend/ to make a few changes to make the free icons work correctly.

kodaxx commented 3 years ago

The issue exists even following your docs. It seems that even if you are using the free icons, the registry it resolves to still needs access.

I was able to fix it and get everything to install properly by changing the @fortawesome/fontawesome-free's "resolved" registry URL to https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.2.tgz

Hope this helps!

jabelone commented 3 years ago

Can I please confirm that you're using npm install to install all the dependencies? Normally during development, the package-lock.json isn't used. It should only be used by the npm ci command to install the "pinned" package versions of all dependencies and sub-dependencies. I've just setup a fresh Ubuntu installation in a virtual machine and am unable to reproduce that error after the latest update.

kodaxx commented 3 years ago

That's correct, only using npm install

On Thu, Mar 4, 2021, 5:47 PM Jaimyn Mayer notifications@github.com wrote:

Can I please confirm that you're using npm install to install all the dependencies? Normally during development, the package-lock.json isn't used. It should only be used by the npm ci command to install the "pinned" package versions of all dependencies and sub-dependencies.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/membermatters/MemberMatters/issues/108#issuecomment-791059960, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSTRSZ4R7IQ64ZGLTYLITLTCASZDANCNFSM4YQM6GLQ .

jabelone commented 3 years ago

And did you pull the latest version after I made those changes? The only other thing I can suggest is to try deleting the repository and re-cloning it as there seems to be something strange going on. What operating system are you on? I've used a fresh install of Ubuntu 20.04.2 LTS and am unable to reproduce that problem with the latest version.

jabelone commented 3 years ago

Alternatively, just deleting the package-lock.json file will cause the next npm install to re-resolve everything.

kodaxx commented 3 years ago

I've done both of those. Deleting and recloning gave me the same error.

I'm in macOS, but I have a Linux laptop as well. I'll try on that and report back to you

On Thu, Mar 4, 2021, 5:55 PM Jaimyn Mayer notifications@github.com wrote:

Alternatively, just deleting the package-lock.json file will cause the next npm install to re-resolve everything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/membermatters/MemberMatters/issues/108#issuecomment-791063283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSTRS6GLUZIFOJSWMZM3JTTCATZJANCNFSM4YQM6GLQ .

jabelone commented 3 years ago

My primary machine is macOS so that shouldn't be the problem. I just used Ubuntu because it was easy to setup a clean/untainted virtual machine for testing. Let me know how it goes on the other machine :)

jabelone commented 3 years ago

Closing this issue as it should have been fixed, and it's been a while without hearing back or seeing the bug happen again. Feel free to open a new issue if it returns.