0

I want to install gulp in the root directory of CentOS 7 but for some reason, after installation, it still says:

gulp: command not found

My npm version is 8.1.2 and node version is 16.13.2. When I try to run gulp -v then I am returned with the gulp version as

CLI version: 2.3.0
Local version: 4.0.2

But When I try to run sudo gulp -v then I am returned with gulp: command not found while it does not happen with npm and node.

I have installed gulp with npm install gulp -g.

Summary:

I want to access gulp in the root directory by using sudo command. I have tried answers from After installation of Gulp: “no command 'gulp' found” and https://stackoverflow.com/a/45707907/5222115 But none of them helped.

Eatsam ul haq
  • 317
  • 1
  • 12
  • 1
    i think you need it in any bin directory rather than root directory – 0nepeop1e Feb 09 '22 at 15:32
  • Actually I want to compile a js file with `gulp` but simply doing so does not render it on frontend. SO it might be the case I need to compile that file as a `root` user. – Eatsam ul haq Feb 09 '22 at 15:34
  • i know, but i mean you need the gulp to be installed in any bin folder like `/bin`, `/usr/bin` or `/usr/local/bin`, i am not familiar with centos, so you need to study which one you should use for manually installed program – 0nepeop1e Feb 09 '22 at 15:37
  • Ok sir thanks a lot – Eatsam ul haq Feb 09 '22 at 15:56

0 Answers0