エラー内容
りあクト!の【II.React基礎編】で
$ yarn add -D @typescript-eslint/parser @typescript-eslint/eslint-plugin \
eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-import \
eslint-plugin-jsx-ally eslint-config-airbnb
と入力したところ
error /.../hello-world/node_modules/eslint-plugin-jsx-ally: Command failed.
Exit code: 1
Command: node ./postinstall.js
Arguments:
Directory: /.../hello-world/node_modules/eslint-plugin-jsx-ally
Output:
/.../hello-world/node_modules/eslint-plugin-jsx-ally/postinstall.js:1
throw new Error('This is the wrong package! Please install eslint-plugin-jsx-a11y')
のエラーが出ました
結論
タイポでした!
「eslint-plugin-jsx-a11y」の「a11y」は英字のLの小文字ではなく数字の11でした!
感想
恥ずかしいです。。。
他にも、りあクト!の【II.React基礎編】の少し前のページで
$ yarn eslint --init
でエラーが出て、解決のためにいろいろ調べてなんとか解決したところで、次の会話で柴崎さんが「なおコマンドがエラーで終わっても、とりあえずは気にしなくてもいいから」とおっしゃられていました。
恥ずかしいです。。。