'gulp' is not recognized as an internal or external command

后端 未结 11 2031
生来不讨喜
生来不讨喜 2021-02-03 17:03

I am trying to use Gulp and Node.Js to stream my process for minifying and concatenating CSS/JS files for production.

Here is what I have done.

  1. I installed
11条回答
  •  误落风尘
    2021-02-03 17:42

    Sorry that was a typo. You can either add node_modules to the end of your user's global path variable, or maybe check the permissions associated with that folder (node _modules). The error doesn't seem like the last case, but I've encountered problems similar to yours. I find the first solution enough for most cases. Just go to environment variables and add the path to node_modules to the last part of your user's path variable. Note I'm saying user and not system.

    Just add a semicolon to the end of the variable declaration and add the static path to your node_module folder. ( Ex c:\path\to\node_module)

    Alternatively you could:

    In your CMD

    PATH=%PATH%;C:\\path\to\node_module
    

    EDIT

    The last solution will work as long as you don't close your CMD. So, use the first solution for a permanent change.

提交回复
热议问题