EDIT2:これで動作します。すべてのローカルeslintパッケージを削除しなければならなかった。すべてが良いです!Eslintとプラグインをインストールしている未対応のピア依存関係
編集:さて、特定のバージョンをインストールした後、それは(^ 1.16.0)と不満を表明しました。コマンドラインで再び機能します。しかし、それは悲しいことに崇拝の中では役に立たなかった。ここで間違っている設定がありますか?
誤って同じパッケージを再度インストールする前に、この機能が動作していましたが、破損しました。最終的に私はESLINTをSublimeと連携させようとしています。私はそこに何も変更していないので、Sublimeのすべてが正しいと思います。 Eslintがもう動作しなくなっているだけです。これは 'eslint app.jsx'などのショーです(下記参照)。
このエラーは、eslint-plugin-importに対して未対応のピア依存関係のエラーが発生します。
aa:myResolutions Andreas$ sudo npm install -g eslint eslint-plugin-import
Password:
/usr/local/bin/eslint -> /usr/local/lib/node_modules/eslint/bin/eslint.js
/usr/local/lib
├── [email protected]
└── [email protected]
aa:myResolutions Andreas$ sudo npm install -g eslint eslint-plugin-import
eslint-config-airbnb eslint-plugin-react eslint-plugin-jsx-a11y
/usr/local/bin/eslint -> /usr/local/lib/node_modules/eslint/bin/eslint.js
/usr/local/lib
├── [email protected]
├─┬ esli[email protected]
│ └── UNMET PEER DEPENDENCY [email protected]^1.16.0
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected]
└── [email protected]
npm WARN [email protected] requires a peer of eslint-plugin-
[email protected]^1.16.0 but none was installed.
npm WARN [email protected] requires a peer of eslint-plugin-
[email protected]^1.16.0 but none was installed.
aa:myResolutions Andreas$ eslint App.jsx
Oops! Something went wrong! :(
ESLint couldn't find the plugin "eslint-plugin-import". This can happen for a
couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-import is
also installed globally. A globally-installed ESLint cannot find a locally-
installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't
installed correctly. Try reinstalling by running the following:
npm i [email protected] --save-dev
私はそれを得ていません。私は最初にそれをインストールしました。しかし、それはもはやインストールされていないのですか?あるいは、少なくともそれは他のパッケージでは見つけられませんか?
これで私の頭を1日以上掻いていました。すべてのプラグインはグローバルにインストールされているので問題にならないはずです。そして、私はノード/ npmを完全に再インストールしましたが、何も役立たないようです。
これを解決する方法はありますか?