Skip to content
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

Don't flag file as not resolvable too early #39

Closed
wants to merge 1 commit into from

Conversation

mantoni
Copy link
Contributor

@mantoni mantoni commented May 22, 2014

After hours of tracing, I found my bug of the day!

When looking for a package, say ./lib/package.json, the file is sometimes marked as unresolvable, even if ./package.json exists. Whether this works or not depends on the order of fs.readFile yields. The next() implementation already flags the file as unresolvable correctly when there are no directories left to check.

Also, this line causes module-deps to return an empty object with just the __dirname in it, which makes browserify work in this case. However, I have a browserify.transform field in the package.json which is then not present, hence the transform is never invoked.

Maybe you have some idea on how to improve error handling in this case.

@ghost
Copy link

ghost commented May 23, 2014

Merged in 2.1.1. Thanks for the patch!

@ghost ghost closed this May 23, 2014
@mantoni
Copy link
Contributor Author

mantoni commented May 23, 2014

Thanks! Mind bumping the dependency in node-browserify to ~2.1.1? It's currently ~2.0.6 so this fix does not get picked up.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant