【问题标题】:Having issues downloading gulp下载 gulp 时遇到问题
【发布时间】:2020-04-06 16:10:17
【问题描述】:

下面是终端输出的样子:

Kayas-MacBook-Pro:~ pineapplelaptop$ npm install --global gulp-cli
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/gulp-cli/bin/gulp.js
npm ERR! dest /usr/local/bin/gulp
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/gulp-cli/bin/gulp.js' -> '/usr/local/bin/gulp'
npm ERR! File exists: /usr/local/bin/gulp
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pineapplelaptop/.npm/_logs/2020-04-06T16_00_35_220Z-debug.log
Kayas-MacBook-Pro:~ pineapplelaptop$ 

还有其他人遇到过这个问题吗?

【问题讨论】:

  • 能否请您添加您的 npm 和节点版本。

标签: javascript gulp


【解决方案1】:

你试过按照上面说的做吗?

npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

另外,请尝试使用命令 npm config list 来查看 npm 中存在的所有配置。

【讨论】:

  • 是的,我已经做过很多次了,但它似乎什么也没做。但我只是做了更多的研究,很快就得到了 gulp 下载。谢谢!
【解决方案2】:

试试这个:

  1. 运行:npm install gulp -g -verbose

  2. 然后运行:set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

【讨论】:

  • 解释一下您的代码以使其成为一个完全可以理解的答案会很棒。
【解决方案3】:

我在ubuntu中解决了,重新安装node

sudo apt-get remove nodejs

sudo apt-get install nodejs

sudo npm install --global gulp-cli

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-10-03
    • 1970-01-01
    • 2022-09-23
    • 1970-01-01
    • 2021-10-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多