-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
resolve.getNpmPaths - nvm prefix #59
Comments
|
Yeah, spawning a command is really, but reallllly SLOW. It's not a good option. I'm okay with using |
Great! I'll probably send you a PR with this update. |
btw, really good job on extracting the environment in its own lib, very pleasant to work with and useful |
Thanks! Also, FWIW, issues might arise more often now that npm behavior is to flatten dependencies. Right now we're always loading |
yep, I had some issues with yo npm linked, but using the |
Might be related to #52
I'm running into an issue when trying to load installed generators with
env#getGeneratorsMeta()
, and I think it's related to nvm and npm prefix being different than the defaults.My test sample is something like:
Looking at the
getNpmPaths()
method, I can see that$NODE_PATH
is used when defined, and I can get the env lookup working with:My question is, would you agree on adding the result of
npm prefix
to the lookup paths automatically ?env.lookup()
is asynchronous, so we might be able to introduce a call to.exec('npm prefix -g')
if you don't mind the performance penalty it might introduce.Alternatively, if you don't want it to be the default behavior, would it be possible to define custom paths? something like:
Either way, it would fix the lookup for nvm installed yeoman and generators. This doesn't apply when
yeoman-environment
is installed globally,yo
works fine in this case.The text was updated successfully, but these errors were encountered: