首页 > 解决方案 > 在 Mac 上安装 gulp 时找不到文件

问题描述

我正在尝试再次在我的 Mac 中安装 gulp,但我无法做到。我之前安装了它,它工作得很好。我使用这个卸载:

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 

我该怎么办?

标签: macosnpmgulp

解决方案


推荐阅读