search

Home  >  Q&A  >  body text

node.js - npm安装gulp时报错,gulp安装不成功。

大家讲道理大家讲道理2863 days ago600

reply all(6)I'll reply

  • PHPz

    PHPz2017-04-17 13:52:45

    Happiness comes so suddenly, I don’t know how it gets better.

    Downloaded and updated node.js

    npm has been replaced by Taobao’s npm image

    $cnpm install gulp//不能带-g, 然后就成功了。

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:52:45

    1. First, if you only use it for projects, add the suffix --save

    2. to the cmd command line.
    3. Second, npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0 This sentence reminds you that your lodash is 2.0.0, but the modules you install must be 3.0.0

    4. Thirdly, the updated version of node is very fast now. Although many things end up running on the latest version of node, and if you use Taobao's mirror, since it is not updated to the implementation, some The npm package is still relatively old. I personally recommend using the official npm package and just learn how to circumvent the firewall.

    reply
    0
  • 迷茫

    迷茫2017-04-17 13:52:45

    With -g, it is a global installation. First check if you have permissions to the relevant paths. Use the command line with administrator permissions under win. Use sudo under Linux/OS X.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 13:52:45

    Hello, has it been resolved? I also encountered the same problem

    reply
    0
  • 迷茫

    迷茫2017-04-17 13:52:45

    A certain module is installed by git and there is a .git directory in it. Just delete the .git

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:52:45

    With -g, administrative rights are required. Installation command: $sudo npm install -g gulp //Just enter your password again

    reply
    0
  • Cancelreply