Open lancejpollard opened 10 years ago
oh interesting, it's probably hanging here:
https://github.com/component/duo/blob/master/lib/duo.js#L679-L681
I've run into that situation before (that's why I added path != '.'
), but there's probably another case I'm missing.
Ok cool, yeah it hangs at that method for some reason. In Duo.prototype.recurse
, here is the path before and after the resolve
call in the for loop:
../user/index.js
/Users/lancejpollard/dev/org/repo/client/user/index.js
and this is the root:
/Users/lancejpollard/dev/org/repo/client/login
Yeah, so the while loop is just going infinitely, so that's it.
Not sure what the logic is supposed to do, any thoughts? It seems like if we try to modify that findroot
function, it will then require changing file, since the whole idea of root is changing. Could get complex maybe.
so it's supposed to find the root, or error out. in this case it should error out, but the path resolves to ..
or something and doesn't satisfy the path == '.'
condition
whatever the path ends up looping on indefinitely, we should probably handle that case
Oh! That's the problem I'm running on now. I was wondering what was wrong in my app.
This thread is a month old, any update?
Yeah, I just came across this myself, really would like to see this supported.
I figure this is something we'd say we shouldn't support, but wanted to document/write about it anyways because other people are bound to run into it too.
Say you have a setup like this:
You have that
./lib
folder to share reusable code between client and server. But, each of the sub-folders under./client/
and./server/
are separate projects, with their ownbuild/build.js
andcomponents
. So in the end you have folders like this:The problem happens in the following situation. Say you have a file here:
And it looks like this:
And then you build like this:
That should give you this:
But instead it just hangs here:
Haven't had time yet to dig into why this might be, but for some reason it hangs.
It seems like we should support resolving it. But it's technically outside of the root, so not sure.
Thoughts?