Answer the question
In order to leave comments, you need to log in
G"gulp" is not an internal or external command, operable program, or batch file?
"gulp" is not an internal or external
command, operable program, or batch file.
what to do????
I feel the problem is in system variables
Answer the question
In order to leave comments, you need to log in
Repeat completely as I wrote:
1. Remove NodeJS completely
2. Install again
3. In the console npm install -g gulp
4. Reboot the computer (do not skip this step).
It also doesn’t start for me if I run it like this: npm gulp [task_name]
but if I write commands in the scripts variable in package.json in which gulp is involved, then everything works for me.
For example, I publish a piece of package.json
{
"name": "project name",
"version": "1.0.0",
"description": "Landing page",
"main": "gulpfile.js",
"scripts": {
"editorconfig": "editorconfig-cli",
"stylelint": "stylelint 'source/sass/**/*.scss' --syntax scss",
"test": "npm run editorconfig",
"build": "gulp style",
"start": "gulp [task_name]"
},
"author": "Vasya Pupkin",
"license": "ISC",
...
I work on Windows 8. The same error appeared.
Open a terminal (command line), write:
npm ls gulp
> `-- [email protected] -> C:\Users\kubris.pro\AppData\Roaming\npm\node_modules\gulp // <- This is the system response
npm ls -g gulp
> C:\Users\kubris.pro\AppData\Roaming\npm
`--
[email protected] locally and globally, it means an error in the paths (PATH). How it arose when everything worked before - I don’t know, but it appeared. If there are no inscriptions about Gulp, then it is not installed.
Next, we write the paths:
- My computer - properties - Advanced system settings =>
- System properties - Environment variables (PS).
There are two windows in the PS - the top one writes the user's path, the bottom one - the system.
In the upper window, in the left column, look for "PATH", climb inside, admire the line "Variable value". In it, at its very end, if something is already written there, insert the system response that came out after the "npm ls gulp" command, namely: "C:\Users\kubris.pro\AppData\Roaming\npm\node_modules\ " => click OK.
In the lower window, we also look for PATH and follow similar instructions, only insert the answer when searching for a global variable: "C:\Users\kubris.pro\AppData\Roaming\npm".
Close the terminal, open it, write gulp --version. If the version of Gulp was observed, then everything, we fixed everything.
ps If we do not observe, then open the browser and write in it:
"gulp is not an internal or external command"
pps Maybe all this can be inserted in any one window, but it seemed to me more logical to do it the way I did.
In my case, the problem was solved as follows (Win10)
1) Deleting nodejs (along with node_modules local folders and global folders in C:\Users\User\AppData\Roaming\npm and C:\Users\User\AppData\Roaming\npm -cache)
2) Install nodejs
3) Run console (cmd or conemu in my case) as admin.. (and it doesn't matter if your user is admin..)
4) install gulp to global folder - "npm install -g gulp "
5) it is important at this point to check the presence of the C:\Users\User\AppData\Roaming\npm\gulp.cmd file and the presence of the path to this file in the PATH system variables.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question