anvilresearch / connect

A modern authorization server built to authenticate your users and protect your APIs
http://anvil.io
MIT License
361 stars 86 forks source link

npm install fails for dependency ldapjs in a closed network #357

Open mati-o opened 7 years ago

mati-o commented 7 years ago

Hi,

I want to try anvil-connect but I'm facing an issue

I'm working in a closed network and I have a privately hosted npm repo. When I try to npm install -g anvil-connect, it fails because ldapjs is specified as GitHub URL in package json. package.json#116 "ldapjs": "mcavage/node-ldapjs",

I believe it won't be an issue to modify this to point to ldapjs in npm directly instead of github. So it would look like : "ldapjs": "^1.0.1", plus it will look more aesthetic imho ;)

Let me know if you can do it, or if you prefer a pull request. If you want me to do a pull request, please note the exact version of ldapjs you prefer i.e ^1.0.1 or ~1.0.1 to avoid confusion.

camfou commented 7 years ago

Hi, I think you can achieve it using npm link.

Clone or get the zipped node-ldapjs repository then in your project :

npm link {path to node-ldapjs project}

It's just a workaround but it should work :)

Camille

mati-o commented 7 years ago

Thanks. I guess I'll try the workaround for now. Hope my solution will be implemented though.

mati-o commented 7 years ago

Hey Camille,

Your suggested workaround did not worked. I've cloned the node-ldapjs repo and used npm link and I can see it have created a symlink in my global node_modules. However, npm install -g anvil-connect still attempts to pull from GitHub.

christiansmith commented 7 years ago

It's pointing to GitHub to get around some issues with the npm releases of ldapjs at the time of the commit. I don't remember specifics but @vsimonian probably knows. New Node.js versions tend to break some of these dependencies and there isn't always a fix published right away. I'm not sure of the current status on this particular dependency in npm.

@mati-o if it works for you with a specific npm version and we can get one more LDAP user to verify, I'd be glad to take the PR. Unfortunately don't have time to test it right now myself, we have crazy time pressure on the all-new oidc libs that this repo will likely depend on for the next major release.

Sorry for the inconvenience and my delayed responses.