#React(hooks)で作ったアプリをGitHubPagesで公開したい
エラー内容(困っていること)
- こちらの記事(ディレクトリ名を変更)のやり方を参考に公開しよとうするとエラーが出る
npm run build
ができない
開発環境
- VScode
- MacBookPro
- M1Pro
- OS:Monterey
出ているエラー
Terminal
counter-app % npm run build > counter-app@0.1.0 build > react-scripts build && mv build docs Creating an optimized production build... Failed to compile. Failed to load config "prettier" to extend from. Referenced from: /Users/name/counter-app/.eslintrc.json
記述しているコード
eslintrc
{ "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint" ], "plugins": ["@typescript-eslint"], "parser": "@typescript-eslint/parser", "parserOptions": { "sourceType": "module" }, "env": { "browser": true, "node": true, "es6": true }, "rules": { // 適当なルール } }
package
..., "homepage": "https://(user name).github.io/(repository name)/", "scripts": { "start": "react-scripts start", "build": "react-scripts build && mv build docs", "test": "react-scripts test", "eject": "react-scripts eject" }, ...,
- ※
user name
は自身のgithubの名前にしています - ※
repository name
は自身のリポジトリ名にしています
試したこと
npm run build
ではなくyarn run build
を試したが同じエラーだった- ESLintが原因だと思い、有効だったものを無効にしたりアインストールを試してみた
よろしくお願いいたします。
まだ回答がついていません
会員登録して回答してみよう