-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
Description
Hello
So I have noticed an issue with the way in which findProjectRoot attempts to find the project root. By doing a indexOf('node_modules) it sometimes gets confused by some file paths:
Example:
/Users/jonathan/Sites/_beamly_node_modules/whitelabel/node_modules/beamly-js-lint/dist
The expected project route should be
/Users/jonathan/Sites/_beamly_node_modules/whitelabel/
But instead the project route is
/Users/jonathan/Sites
This unfortunately is incorrect, because of the indexOf it is finding the directory I store my modules in _beamly_node_modules
Perhaps a valid fall back if it doesnt find a package.json like that would be to use process.cwd() to find the package.json
Thanks
Jonathan