pmgo
pmgo copied to clipboard
FATA[0000] Failed to start go bin due to: ERROR: chdir ...: no such file or directory OUTPUT
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?
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 ❤️
The below steps worked for me.
-
By default my $GOPATH was $HOME/go ( /root/go )
-
After we have our go path set, do
go get github.com/struCoder/pmgo
-
Then do mv $GOPATH/bin/pmgo /usr/local/bin
-
After that we navigate to /root/go/ and make sure you have a src directory in there, if not create one.
-
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
- Then do pmgo start test app-name
Hope it works for you too.
not at all working
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.