【问题标题】:How can I fix errors when installing npm version 6.4.1安装 npm 6.4.1 版时如何修复错误
【发布时间】:2019-07-14 05:28:31
【问题描述】:

我使用 AngularJS 应用程序安装了 npm --> npm install。我得到的是 6.4.1 版本,但是当我输入 npm auditnpm fix audit 来解决一些问题时,我看到下面的消息:

λ npm 审计 npm 错误!代码 ELOCKVERIFY npm 错误!在您的 package-lock.json 中发现错误,运行 npm install 来修复它们。 npm 错误!缺少:gulp-sass@^2.0.4 npm 错误!可以在以下位置找到此运行的完整日志: npm 错误! C:\Users\iamari\AppData\Roaming\npm-cache\_logs\2019-02-20T10_16_09_010Z-debug.log

然后,我尝试使用npm install gulp-sassnpm i gulp-sass 进行修复。我在 package.json 文件中得到 "gulp-sass": "^2.0.4",。但我之前提到过同样的错误。 请问有什么解决办法吗?

【问题讨论】:

    标签: node.js angularjs npm sass gulp


    【解决方案1】:

    也许您可以尝试删除您的package-lock.json,然后重新安装gulp-sass

    rm -f package-lock.json
    npm i gulp-sass
    

    看起来你可能有锁定文件冲突。

    希望对您有所帮助!

    【讨论】:

    • 非常感谢它的工作原理 :) 我已经诊断出漏洞found 78 vulnerabilities (35 low, 12 moderate, 30 high, 1 critical) in 16201 scanned packages 75 vulnerabilities require semver-major dependency updates. 3 vulnerabilities require manual review. See the full report for details.
    猜你喜欢
    • 1970-01-01
    • 2020-07-24
    • 2020-11-01
    • 2019-05-20
    • 2022-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-01
    相关资源
    最近更新 更多