Reputation: 1
I'm trying to use gulp for the first time.
Following instructions online, I installed it globally as well as locally, but I still get the
'gulp' is not recognized as an internal or external command[...]
error. When using PowerShell instead of cmd the error is the term 'gulp' is not recognized as the name of a cmdlet, function, script file[...]
I've tried:
npm install -g npm@latest
to make sure npm is up-to-dateI'm stumped. On top of all that, I have other npm packages installed globally that work fine.
Edit: I fixed this by adding npm to my PATH environment variable. I had been adding it to NODE_PATH, which doesn't work for CLI use.
Upvotes: 0
Views: 268
Reputation: 692
You can add the gulp script in the package.json file and run the gulp command using npm.
Ex:
"scripts": { "helloTest": "gulp helloTest", }
And now type below command in terminal:
npm run helloTest
Upvotes: 0
Reputation: 1477
"Global install" with the -g
flag basically means you install the command provided with the package.
To globally install gulp:
npm install gulp -g
Upvotes: 0