代码之家  ›  专栏  ›  技术社区  ›  Julioarhernandez

在Mac上安装gulp时找不到文件

  •  1
  • Julioarhernandez  · 技术社区  · 5 年前

    我试图安装gulp,再次在我的Mac,但我不能做到这一点。我以前安装过,效果很好。我使用以下方法卸载:

    npm uninstall gulp
    

    但现在,当我再次尝试安装它时,我得到了许多不同模块的此类警告

    WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/fsevents-6a1ce00e/node_modules/string_decoder/lib'
    WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/es5-ext-802ca696/test/string/#/code-point-at'
    WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/fsevents-6a1ce00e/node_modules/string-width'
    WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/es5-ext-802ca696/test/string/#/contains'
    

    最后是一个错误

    npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/atob/bin/atob.js
    npm ERR! code ENOENT
    npm ERR! errno -2
    npm ERR! syscall chmod
    npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/gulp/node_modules/atob/bin/atob.js'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent 
    

    我该怎么办?

    0 回复  |  直到 5 年前