-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
If an explicit cwd is provided, try searching for the module there if it could otherwise not be determined #55
Comments
I'm confused by this issue. If a |
This is true, but is not the case when a In my specific situation, I have a I realize that in most cases the |
Perhaps some code would better explain it. (See grahamaj@4245300) I am not sure if this code is perfectly correct, though the unit tests still pass. I am not familiar enough with the rest of the code to know how to fully account for the assignment on line 107 of the original code. |
Heya @grahamaj, I understand what you're saying and I agree that this should be possible. Would you please open a PR with your changes? ...as for what this block is doing: Imagine for a moment that you had gulp-cli installed and were working on gulp itself. Since gulp-cli uses liftoff, and it tells liftoff that a local copy of gulp is needed, liftoff needs to be able to detect this. If gulp itself had a gulpfile, the dependency required to run it wouldn't be in |
I've ran into the same problem with the following directory layout:
Grunt uses LiftOff these days like the following:
But had the same problem in the past on its own as well. The workaround then was to simply set the current working dir of the process:
With switching to LiftOff this doesn't work anymore and the current working directory is not recognized during searching for modules, even though it's provided on the shell using
|
The current implementation chooses to search for the module in the following order:
configPath
directory>/node_modules/configPath
directory>/package.jsonI have a need for the search to continue. Perhaps if these first two searches turn out unsuccessful, these 2 steps could be repeated in the CWD (in place of the
configPath
) if an explicit one was provided. So the process would be to search for the module in the following order:configPath
directory>/node_modules/configPath
directory>/package.jsoncwd
>/node_modules/cwd
>/package.jsonThe text was updated successfully, but these errors were encountered: