Git-Auto-Deploy icon indicating copy to clipboard operation
Git-Auto-Deploy copied to clipboard

Deploy command saying not recognised as internal or external command

Open huzaifa4725 opened this issue 5 years ago • 8 comments

I am using GAD with gitlab. Everything working fine but i want to run npm install after git pull. so i put "deploy": "npm install" it saying npm install not recognized as internal or external command. However i put "echo deploying" it still saying the same. How can i solve this issue ? My problem is to run npm install after git pull. npm is in path variable i checked this.

huzaifa4725 avatar Aug 06 '19 09:08 huzaifa4725

put npm in path of the GAD user or put absolute path to npm command: for example: /usr/bin/npm install

Letme avatar Aug 06 '19 11:08 Letme

I am running on windows server 2016. So what we do in case of windows ? Also do tell me how we can run two commands ? need to add twice deploy Thanks

huzaifa4725 avatar Aug 06 '19 11:08 huzaifa4725

No idea about windows and paths, but for sure this sounds like a path issue.

I use && in between commands, but there are quite few other options (again no idea how you chain commands in windows).

Letme avatar Aug 06 '19 11:08 Letme

In windows command prompt npm install works fine but it does not working in deploy

huzaifa4725 avatar Aug 06 '19 11:08 huzaifa4725

Also in windows you have different users and there path is also different. So question is if npm install runs in the command prompt (also this can be different on windows as you have cmd.exe, command.exe, powershell and few more) which your GAD user uses.

Letme avatar Aug 06 '19 11:08 Letme

Its the same user and command prompt path is same for all users. So how can i know where deploy is running command ? because its not running echo even

huzaifa4725 avatar Aug 06 '19 12:08 huzaifa4725

Did you test this command in git bash? Although that for sure should have echo, so its strange. (I assume you installed it through pip and then went to install git bash and configure it as in readme?)

Letme avatar Aug 06 '19 13:08 Letme

git bash is installed on pc. npm install running fine on git bash and cmd. i tested echo also working fine but deploy is not running anything. So i guess there is some path issue or i dont know where its running command

huzaifa4725 avatar Aug 06 '19 14:08 huzaifa4725