【问题标题】:npm Install Errors & npm WARN deprecated不推荐使用 npm 安装错误和 npm WARN
【发布时间】:2021-06-14 12:57:56
【问题描述】:

无法安装来自 node.js 11.15.0 的 gulp。我也尝试了 10.x 版本,它抛出了同样的错误。

$ npm install -g 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

changed 265 packages, and audited 266 packages in 57s

6 packages are looking for funding
  run `npm fund` for details

3 low severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

谁能帮我安装 gulp?

我尝试删除 node_modules 目录,然后使用清除缓存 "npm cache clear --force" 命令。但没有运气。

另外,运行 npm install 时遇到问题

$ npm install
npm ERR! code 1
npm ERR! path C:\..........\node_modules\node-sass
npm ERR! command failed
....
npm ERR! gyp ERR! node -v v11.15.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

【问题讨论】:

    标签: node.js gulp


    【解决方案1】:

    我终于明白了。 npm install 在我的 Windows 系统中运行良好。

    删除 node_modules 目录和 package-lock.json 然后使用此命令清除缓存

    npm cache clear --force
    

    我删除了 npm 和 npm-cache 文件夹 C:\Users\USERNAME\AppData\Roaming\npmC:\Users\USERNAME\AppData\Roaming\npm-cache

    然后我尝试安装 npm

    npm install
    

    我希望这对某人有所帮助。

    【讨论】:

    • 但是,仍然 npm install -g gulp-cli 抛出警告消息
    • 这个docs.npmjs.com/…怎么样
    【解决方案2】:

    如果您遇到同样的问题,请尝试在 Netlify 上部署您的应用程序,然后您将看到构建日志,以便您修复代码!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-20
      • 2023-03-24
      • 2020-07-22
      • 1970-01-01
      • 1970-01-01
      • 2023-01-12
      • 2020-05-27
      • 2016-05-31
      相关资源
      最近更新 更多