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

FATA[0000] Failed to start go bin due to: ERROR: chdir ...: no such file or directory OUTPUT #65

Open
srad opened this issue Aug 7, 2021 · 4 comments

Comments

@srad
Copy link

srad commented Aug 7, 2021

Hi, I'm Currently switching from Node's pm2 to pmgo. It seems obviously named after pm2 but seems to work differently.

I installed it the second way described in the readme.

When I then exactly follow what's written in the readme:

pmgo start path/to/source-directory app-name

Also without the leading slash, ablsolute, relative path, whatever, I get following error message and wrongly changed path which I didn't specify:

FATA[0000] Failed to start go bin due to: ERROR: chdir /src/path/to/source-directory: no such file or directory OUTPUT:  

To any path "/src" prefix is added, anybody an idea what is going on?

@Looskie
Copy link

Looskie commented Sep 27, 2021

hey are you trying to run a compiled binary?

if so add true at the end,
pmgo start path/to/source-directory app-name true

hopefully this saves you the three hours i spent trying to figure it out ❤️

@tech-engine
Copy link

The below steps worked for me.

  1. By default my $GOPATH was $HOME/go ( /root/go )

  2. After we have our go path set, do

go get github.com/struCoder/pmgo

  1. Then do mv $GOPATH/bin/pmgo /usr/local/bin

  2. After that we navigate to /root/go/ and make sure you have a src directory in there, if not create one.

  3. Move your directory(where your code lives) eg. in my case my main.go was in a directory named test, so I did

mv /root/test $HOME/src

  1. Then do pmgo start test app-name

Hope it works for you too.

@shailesh-flowace
Copy link

not at all working

@tech-engine
Copy link

tech-engine commented Sep 21, 2022

Another way it worked for me.

My env values

$GOPATH = /home/joe/go

please make sure that you the below set

export GOPATH=$HOME/go

whenever we type the command

pmgo start my_project my-app

it seems to try to find my_project dir inside $HOME/go/src

Download and build pmgo

1. cd /home/joe
2. git clone https://github.com/struCoder/pmgo.git
3. cd pmgo
4. go build -v pmgo.go
5. mv pmgo /usr/local/bin
6. pmgo version

Copying our source code to appropriate dir so that pmgo can find it.

Now that we have pmgo installed we need to copy your source code to /home/joe/go/src

7. cd /path/to/source/my_project
8. cp -R . /home/joe/go/src/my_project
9. pmgo start my_project my-app

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants