0

I'm new to this! I am following a tutorial and we installed everything, and I want to run the gulp command but I can't. This is the json package-

"name": "wlbs4",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"browser-sync": "^2.26.7",
"gulp": "^3.8.10",
"gulp-sass": "^4.0.2"
},
"dependencies": {
"bootstrap": "^4.4.1",
"jquery": "^3.4.1",
"popper.js": "^1.16.1"

This is my terminal command:

Noas-iMac:wlbs4 noahanan$ gulp
bash: gulp: command not found

What am I doing wrong? Thanks! I tried to install globally but I think I don't have permission.

Thanks!!

pitzki
  • 147
  • 1
  • 2
  • 10

1 Answers1

1

If you want to run gulp globally (as you are doing in your question), you need to install gulp globally on your machine.

npm install -g gulp

You don't need to do this for the other dependencies in your project.

If you run into permissions issues, try:

sudo npm install -g gulp

However, take caution - it is not always considered 'good' practice to install Node Packages with Root level privelages.

This Stack Overflow answer should give you further guidance on the topic https://stackoverflow.com/a/24404451/2316753

Alex Mulchinock
  • 2,119
  • 1
  • 18
  • 25
  • Thank you so much. I seem to be denied access to do this: If you believe this might be a permissions issue, please double-check the permissions of the file and its containing directories, or try running the command again as root/Administrator. – pitzki Feb 25 '20 at 16:25