laravel - 当 npm 我 imagemin 说自己没有安装?警告 img-loader@3.0.0 需要 imagemin@^5.0.0 的同级但没有安装

标签 laravel ubuntu-16.04 npm-install laravel-echo imagemin

npm-v 6.4.1 nvm——版本 0.33.11

当我安装 laravel-echo 时(在 ubuntu16.04 中)

npm i --save socket.io-client

我收到错误警告

npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN img-loader@3.0.0 requires a peer of imagemin@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ socket.io-client@2.1.1
added 26 packages from 21 contributors and audited 11731 packages in 35.934s
found 0 vulnerabilities

所以我继续安装它们

npm i imagemin

但是我得到了自身缺失的错误?

I want to install the imagemin but it says itself missing?
    npm WARN img-loader@3.0.0 requires a peer of imagemin@^5.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

    + imagemin@6.0.0
    updated 1 package and audited 12680 packages in 30.571s
    found 0 vulnerabilities

我也试试

$npm install -g npm-install-peers

$npm-install-peers

显示

This package doesn't seem to have any peerDependencies

最佳答案

npm 安装 imagemin@^5.0.0

帮我修好了。

关于laravel - 当 npm 我 imagemin 说自己没有安装?警告 img-loader@3.0.0 需要 imagemin@^5.0.0 的同级但没有安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52356363/

相关文章:

laravel - 如何在 Laravel Livewire 中使用复选框

mysql - 找不到基表或 View : 1146 Table '' doesn't exist

python - 使用 Docker 的名称解析 [Errno -3] 暂时失败

python - 支持配置标志的最新版本的 pip

node.js - zlib:zlib 绑定(bind)​​已关闭

javascript - 如何在 Node 项目中包含 Bootstrap

php - 如何在 Laravel 5.1 中更新 hasMany 关系

python - Ubuntu 16.04上Caffe编译错误

node.js - 即使 @angular/cli 是全局的并且位于环境变量中,也找不到 ng

javascript - v-for 列表中的 Vue2 模态