使用 Yarn 安装依赖项时出错

问题描述 投票:0回答:1

当我使用yarn安装Vue项目的依赖项时,出现此错误:

error Couldn't find package "loader-utils@^1.4.0" required by "babel-loader@^8.0.5" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find package "loader-utils@^1.2.3" required by "webpack@^4.0.0" on the "npm" registry.
    at MessageError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:721:66)
    at new MessageError (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:750:123)
    at PackageRequest.<anonymous> (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:36539:17)
    at Generator.throw (<anonymous>)
    at step (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:310:30)
    at /usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:323:13
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

如何解决这个问题?

vue.js dependencies yarnpkg
1个回答
0
投票

npm 安装 loader-utils --save-dev

© www.soinside.com 2019 - 2024. All rights reserved.