-
Notifications
You must be signed in to change notification settings - Fork 10
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
can't find proto file #5
Comments
I'm not quite sure right now what causes this. The path from the config node is just handed over to the protobufjs library, which then throws the error. Can you provide a little more context? |
I have the same issue. The configuration never seems to be satisfied and nodered will log the following [error] [protobuf-file:cb338d5.45df67] Error when trying to watch the file on disk: Error: ENOENT: no such file or directory, watch I'm running Nodered in windows in this case, and put the full path to the proto file. I also tried moving the proto file into the nodered installation folder, or the various probuff module folders, but same result. |
note that I changed the protofile.js to use watchFile instead of watch, and the error goes away. A quick test of the encode, seems to work. I also noticed for windows the regex used to validate the file path isn't correct. Causes the node to look like it's miss configured validate:RED.validators.regex(/^(/[^\/ ]*)+/?$/) Instead of this validation, I removed it, and in the encode and decode nodes I added this in the registration of the nodes to show to the user, the config is currently not valid if(this.protofile.prototypes === undefined){ NOTE the file watch doesn't seem to work though... |
Using fs.watchFile seems to work on more cases than simply using watch. Partially fixes issue discussed in #5
After watchFile won't work in the unit tests and is inferior to watch according to the docs watch is used again. This is related to #5
I think we have to different issues here: this issue is about certain access problems to files on heroku. I don't know about that one right now @robomike The other one has to do with the file watch feature for which I'll open a separate issue (#12). Since it seems to cause problems for some people the option to use a file watch is now opt-out in the configuration node as a workaround until the issue is better understood and solved. As for your fix since the watchFile code is not working (I verified that) it's basically deactivating the file watch which is now configurable. Then there is the issue with the insufficient / broken validator for paths which only respects unix paths. The validator is already removed in 1.0.5 |
Hi all,
I have tried many different relative paths to the .proto file. The problem is I keep getting this error:
"Proto file could not be loaded. Error: ENOENT: no such file or directory, open '"../src/assets/protocol_buffers_files/generic_message.proto"'
I have also tried this "/src/assets/protocol_buffers_files/generic_message.proto"
The instance of my node-red deployment is on heroku. The relative path is correct. Why can't node-red-contrib-protobuf find the proto file?
The text was updated successfully, but these errors were encountered: