-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
This node causes Node.JS module get-installed-path to stop working #97
Comments
There is actually no exports and Array is not used so it could be overwrite it. I suppose it could come from some underlying dependency instead of directly node-red-contrib-opcua. Have to investigate more... |
Hi, thanks for the response. I don't actually use your node myself as I don't have the hardware but as you can see from the reference, one of the users of uibuilder reported it.
Urgh! Not a good approach! Sounds like you are right. This illustrates exactly why extending the prototype of a native object isn't a good approach. Too easy to break something. |
Though, I can see that the collections package is actually at v5, you are using v3. Possibly this has been fixed in a later release? |
Can you test it now? I am at work and I will have time perhaps later today? |
OK, I updated collections and node-opcua to latest ones. |
Has anybody tested new version? New one will use JS Map instead of Set, should be better now. |
get-installed-path is used by node-red-contrib-uibuilder to find the install paths for front-end libraries that have been installed using npm.
If this node is installed, the sync version of the function
getInstalledPathSync
stops working. I've not tried the other version which returns a promise.The issue lies at line 130 of that module:
The find function is never executed.
If node-red-contrib-opcua is removed, the function starts working again.
To me, this implies that something that this node is doing is overwriting the native
Array.prototype.find
function? Everything else appears to be working as normal.The text was updated successfully, but these errors were encountered: