New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Resolvers need to be globally installed. #1919
Comments
You have few options:
The only option that doesn't work is installing bower globally and resolver locally. Maybe we could fix that. I'm not sure. Things get more complicated when |
@sheerun I understand that this investigation can take some time. Can we please include this in the documentation for Custom Resolvers ?? |
Yes, but I need to confirm those cases before documenting them publicly :) |
Please add documentation, I just got tripped up by this too. |
This issue can be close since it's documented now. |
Agree.. Closing. |
Sorry, I'm not sure if the actual problem @gaurav21r and I had was documented. The usage section that @ptitgraig linked to mentions that you can use resolvers globally or locally, but doesn't go into more detail. Specifically it doesn't mention that you have to install the resolver globally if bower is installed globally. |
Oh, I get it. I thought the first sentence is enough, stating to install globally, but I see where you're coming from. I'll keep it open, also because
|
Thanks. Appreciate your work on this! 🙇 |
Indeed, my mistake. |
Is fixing that as simple as trying something like trying to require the resolver and if that fails resolve it relative to (Having said that I can't immediately see the code that's loading these resolvers.) |
It's line 60 of resolverFactory.js (simple require call). I think your approach would fix it (require |
PoC implementation for review and feedback. Fixes bower#1919
I was trying to make my own resolver.
I found that only when I installed my Custom Resolver globally using
npm -g
did it work.I'm on Windows. On trying to use local resolvers, I am getting:
bower MODULE_NOT_FOUND Cannot find module 'test-resolver'
The text was updated successfully, but these errors were encountered: