ConnectEverything / nats-by-example

Collection of runnable, reference examples using NATS (https://nats.io)
https://natsbyexample.com
152 stars 37 forks source link

nbe CLI issues on Windows #118

Closed bruth closed 2 months ago

bruth commented 1 year ago

Discussed in https://github.com/ConnectEverything/nats-by-example/discussions/117

Originally posted by **twquan1** July 14, 2023 I had tried to download nbe file and paste at both "C:\nats-by-example-0.1.3" and "..\cmd\nbe" folder, then run the nbe script by this directory: ![image](https://github.com/ConnectEverything/nats-by-example/assets/56615342/78a79bac-54fc-478a-a410-5332bbe9cf40) However I would receive this message, what do I did wrong here? Sorry I am beginner here. Edits: I had change the nbe file format into ".exe", and the cmd able to run the command alrdy but I received new error message like this: ![image](https://github.com/ConnectEverything/nats-by-example/assets/56615342/91aa14e4-4579-4461-9026-3939d5a3f021) I had installed docker desktop but this error are popping up instead, what configuration I still needed to edit to able to run this nbe cmd?
eric807791961 commented 1 year ago

Hi, I was encountering the same issue, hope this will help the others

simply add

imageTag = strings.Replace(imageTag, "\", "/", -1)

under line 128 and import "strings" in the docker.go file of the cmd/nbe folder

debbyglance commented 10 months ago

The above suggestion worked for me, except it looks like the discussion editor dropped a backslash when the code was pasted.

The correct fix is:

imageTag = strings.Replace(imageTag, "\\", "/", -1)

suvy1 commented 8 months ago

After updating the docker.go on line 128 , how to generate the nbe exe?

Soundman32 commented 2 months ago

I'm still getting the same issues. Has the executable been updated, or do I still need to install go to fix this?

scottf commented 2 months ago

Fixing path and windows exe build https://github.com/ConnectEverything/nats-by-example/pull/237

scottf commented 2 months ago

This has been fixed and released. Thanks everyone for their comments and patience.

https://github.com/ConnectEverything/nats-by-example/releases/tag/v0.1.4

@twquan1 @Soundman32 @debbyglance @eric807791961