npm WARN [email protected] requires a peer of eslint@^3.17.0 || ^4.0.0 but none

react-native 项目 npm install报warning,解决方法:


npm WARN [email protected] requires a peer of eslint@^3.17.0 || ^4.0.0 but none is installed. 



根据提示:[email protected] ,eslint 插件应该有依赖eslint@^3.17.0 || ^4.0.0 ;

到项目根目录下找到package.json文件,添加如下两行:

"dependencies": {
"react": "16.3.1",
"react-native": "0.55.4",
"eslint": "^3.17.0",
"eslint-plugin-react-native": "^3.2.1"
},

再次在终端输入npm install即可解决。

成功如下图;

参考:https://blog.csdn.net/weixin_37852133/article/details/78716854


你可能感兴趣的:(npm WARN [email protected] requires a peer of eslint@^3.17.0 || ^4.0.0 but none)