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

node-red-contrib-opcua breaks get-installed-path module #40

Closed
Plantronixs opened this issue Jan 17, 2019 · 5 comments
Closed

node-red-contrib-opcua breaks get-installed-path module #40

Plantronixs opened this issue Jan 17, 2019 · 5 comments
Assignees
Labels

Comments

@Plantronixs
Copy link

Hello,

I would like to build a user interface for a PLC.

node-red-contrib-opcua works fine.
node-red-contrib-uibuilder too.

Only if I installed both at the same time the uibuilder does not work any more.
Node-RED throws this error message: [error] [uibuilder:3392aa63.c41f06] TypeError: root path must be a string

I've already reinstalled everything. There was no improvement. As soon as I uninstall node-red-contrib-opcua the uibuilder works again.

Any idea?

@TotallyInformation
Copy link
Owner

TotallyInformation commented Jan 22, 2019

Apologies for not seeing this earlier.

I think that error message is indicating that the path (last section of the URL) for your node is not a string. e.g. the default /uibuilder path. Hard to see how a different node could be causing that.

First thing we need to do is to track down where in uibuilder that error is actually ocuring. Have you turned uibuilder's debug logging up to max? That is in the settings.js file. Then you should be getting a uibuilder.log file with a lot of output in it. You should be able to identify the last few lines of log output. If you could post that here, it may help.

Couple of other things to maybe try:

  • Does it make a difference what order you install the nodes?
  • Does the error happen when you add nodes to your flow or even if you just have the nodes on the pallette but not in a flow?

Thanks.

@TotallyInformation
Copy link
Owner

Right, after some debugging. I've identified where the problem is but not why it is happening as yet.

The problem comes from a 3rd-party module called get-installed-path

https://www.npmjs.com/package/get-installed-path

Once you install node-red-contrib-opcua, the function I'm using from that module called getInstalledPathSync on line 345 fails to return the path as anticipated.

I've checked and the right version is installed so that isn't the problem. Something in contrib-opcua is interfering with the function.

I have to say that this is not an issue with uibuilder - something in contrib-opcua is causing an issue - not the other way around as far as I can tell.

I'll be on the road for a couple of hours now - I'll try to look at the issue more later.

In the meantime, I recommend that you raise an issue with the author of contrib-opcua.

@TotallyInformation
Copy link
Owner

OK, proven now. get-installed-path's getInstalledPathSync function stops working once node-red-contrib-opcua is installed. This happens even if uibuilder is not installed.

I have raised a new issue against that node.

mikakaraila/node-red-contrib-opcua#97

@TotallyInformation
Copy link
Owner

Marking this as "wontfix" for now as it isn't directly an issue with uibuilder. However, I'm going to leave it open as I may be able to find a more robust method for finding the location of installed modules. If I can, I will then try to fix the issue.

@TotallyInformation TotallyInformation changed the title Conflict with node-red-contrib-opcua? node-red-contrib-opcua breaks get-installed-path module Jan 22, 2019
@TotallyInformation TotallyInformation added enhancement Improvements to code or new features and removed wontfix labels Jan 22, 2019
@TotallyInformation
Copy link
Owner

node-red-contrib-opcua has now been updated to try and resolve their Issue #97. Can you please try again to see if that fixed the problem.

As I can now see that the issue is a dependency is messing up Array.prototype.find there is no point in me trying to fix this myself.

@TotallyInformation TotallyInformation added wontfix and removed enhancement Improvements to code or new features labels Feb 15, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants