-
Notifications
You must be signed in to change notification settings - Fork 57
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
Util dependency not specified in package.json #14
Comments
How do you have a project that doesn't have |
I have a similar problem in a react native project, when including binary tree it complains about being unable to resolve util in avltree.js, understood this is native node, but how could this happen? |
this could be from the above facebook/react-native#526, seems like it is a react native issue you have to npm install util as a workaround |
@Alttaf, Yes, that solution works! |
I suppose you miss a util dependency in your package.json... Please add it... |
@marcolino util is built in |
What do you mean by builtin? If I do not add it to my project dependencies, I can't build my project, which has node-binary-search-tree as a sub-sub-sub dependency... :-( |
@alice0meta means that This is strictly an incompatibility with React Native not fully supporting a Node.js-compatible environment, and it is going to be extremely common among many Node modules you try to |
I have made a pull request that simply copies the inherits method from node.js utils to customUtils, so there is no longer a dependency on the node module. The correct way of doing this is to upgrade to ES6 as inherits is deprecated anyway, but this is simple and fast... #17 (useful if you don't want/need the utils package - as mentioned by @Alttaf) |
binary-search-tree requires `util`, but does not enumerate it as a dependency. This is a known issue with it louischatriot/node-binary-search-tree#14 This adds `util` as a primary dependency so that this require will not fail. While we're fixing up meta-information, this adds build time artifacts `/lib` and `/yarn.lock` to the ignore list.
In the file
lib/avltree.js
there is a require forutil
, but this lib was never specified as a dependency in package.json.When trying to use
node-binary-search-tree
on a project that don't haveutil
as a dependency it's generate an error.The text was updated successfully, but these errors were encountered: