0

So I have npm and installed gulp globally. gulp.cmd is available under %Appdata%/npm and it had added the NODE_PATH user variable.

When I type in gulp in my command prompt, it returns 'gulp' is not recognized as an internal or external command. But it is! It is in %Appdata%/npm.

Why is that? I've checked and the links are valid and I can execute gulp like so %node_path%/gulp

Daniel Cheung
  • 255
  • 3
  • 19
  • The directory containing `gulp` is not in your `PATH`. – DavidPostill Jan 22 '16 at 13:36
  • @DavidPostill Shouldn't I still be able to execute programs from user variable paths? – Daniel Cheung Jan 22 '16 at 13:36
  • No. Read the duplicate question. – DavidPostill Jan 22 '16 at 13:38
  • @DavidPostill this question is no where near similar with the question this is marked duplicate of... – Daniel Cheung Jan 22 '16 at 13:38
  • Yes it is. It explains what a path is and tell you how to add things to the path. I already told you "The directory containing gulp is not in your PATH" – DavidPostill Jan 22 '16 at 13:41
  • @DavidPostill I'm sorry, but my IQ is approaching 0, I can't seem to find something like "command prompt will not execute programs in any user variables paths" in the linked question. Mind to enlighten me? – Daniel Cheung Jan 22 '16 at 13:43
  • `echo %path%` will show you what is in your path. Is `%Appdata%/npm` in that list? Is `%node_path%/gulp` in that list? – DavidPostill Jan 22 '16 at 13:43
  • @DavidPostill `%Appdata%/npm` is the value of `NODE_PATH`, the user variable. I might want to rephrase the question to: Can command prompt run programs in user variable paths. – Daniel Cheung Jan 22 '16 at 13:46
  • No. The command prompt will execute programs in the PATH. Not some user defined variable **unless you add that to the PATH**. – DavidPostill Jan 22 '16 at 13:48
  • You can add `%Appdata%/npm` or `%node_path%` to the PATH **as explained in the dupe question – DavidPostill Jan 22 '16 at 13:53
  • @DavidPostill Then I feel terribly sorry for not being familiar with Windows. However, I still insist that this question is not the same as the linked one because we had different intentions. Thanks. – Daniel Cheung Jan 22 '16 at 13:53

0 Answers0