eslint不在全球安装

时间:2019-12-02 13:43:21

标签: npm eslint peer-dependencies

我正在尝试在计算机上全局安装eslint。 首先,我安装eslint,它可以工作。 但是然后,当我尝试安装配置模块时收到npm警告,提示未安装eslint。如何对npm说存在对等依赖关系?还是我误会了什么?

:~$ sudo npm install -g eslint
/usr/local/lib/nodejs/node-v12.13.1-linux-x64/bin/eslint -> /usr/local/lib/nodejs/node-v12.13.1-linux-x64/lib/node_modules/eslint/bin/eslint.js
+ eslint@6.7.2
updated 1 package in 2.788s

:~$ eslint -v
v6.7.2

:~$ sudo npm install -g eslint-config-standard
npm WARN eslint-config-standard@14.1.0 requires a peer of eslint@>=6.2.2 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-standard@14.1.0 requires a peer of eslint-plugin-import@>=2.18.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-standard@14.1.0 requires a peer of eslint-plugin-node@>=9.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-standard@14.1.0 requires a peer of eslint-plugin-promise@>=4.2.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-standard@14.1.0 requires a peer of eslint-plugin-standard@>=4.0.0 but none is installed. You must install peer dependencies yourself.
+ eslint-config-standard@14.1.0
updated 1 package in 0.178s

:~$ 

0 个答案:

没有答案