質問編集履歴
3
加筆
title
CHANGED
File without changes
|
body
CHANGED
@@ -107,7 +107,6 @@
|
|
107
107
|
"resolveJsonModule": true,
|
108
108
|
"isolatedModules": true,
|
109
109
|
"jsx": "preserve",
|
110
|
-
"baseUrl": "./src"
|
111
110
|
},
|
112
111
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "functions/lib/index.js"],
|
113
112
|
"exclude": ["node_modules", "functions"]
|
@@ -190,6 +189,7 @@
|
|
190
189
|
webpackのバージョン: 4.46.0 に変更してみましたが変わらずエラーが発生したため元に戻しました。
|
191
190
|
[https://qiita.com/someone7140/items/73e72ef66cd580c850de](https://qiita.com/someone7140/items/73e72ef66cd580c850de)
|
192
191
|
- nodeのバージョンの v14.15.0 , v16.4.0 を試したが変化なし。
|
192
|
+
- tsconfig.jsonに "baseUrl": "./src"追加→変化なし
|
193
193
|
- node_moduleの削除、再インストール
|
194
194
|
- yarn, npm のキャッシュ削除
|
195
195
|
- webpack4に変更
|
2
加筆
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|

|
15
15
|
|
16
16
|
######profileImageUpload.tsx
|
17
|
-

|
18
18
|
|
19
19
|
######package.json
|
20
20
|
```
|
@@ -39,7 +39,7 @@
|
|
39
39
|
"@types/node-fetch": "^2.5.10",
|
40
40
|
"alpinejs": "^2.8.1",
|
41
41
|
"data-uri-to-file": "^0.1.8",
|
42
|
-
"eslint-plugin-react": "^7.
|
42
|
+
"eslint-plugin-react": "^7.24.0",
|
43
43
|
"eslint-plugin-tailwind": "^0.2.1",
|
44
44
|
"firebase": "^8.3.0",
|
45
45
|
"firebase-tools": "^9.12.1",
|
@@ -66,7 +66,8 @@
|
|
66
66
|
},
|
67
67
|
"devDependencies": {
|
68
68
|
"@types/node": "^14.14.34",
|
69
|
-
"@types/react": "^17.0.
|
69
|
+
"@types/react": "^17.0.11",
|
70
|
+
"@types/react-dom": "^17.0.8",
|
70
71
|
"@typescript-eslint/eslint-plugin": "^4.28.0",
|
71
72
|
"@typescript-eslint/parser": "^4.28.0",
|
72
73
|
"autoprefixer": "^10.2.5",
|
@@ -75,6 +76,7 @@
|
|
75
76
|
"eslint-config-next": "^11.0.0",
|
76
77
|
"eslint-config-prettier": "^8.3.0",
|
77
78
|
"eslint-plugin-prettier": "^3.3.1",
|
79
|
+
"eslint-plugin-react-hooks": "^4.2.0",
|
78
80
|
"postcss": "^8.2.8",
|
79
81
|
"prettier": "^2.3.1",
|
80
82
|
"prettier-plugin-firestore-rules": "^0.1.5",
|
@@ -84,43 +86,9 @@
|
|
84
86
|
}
|
85
87
|
}
|
86
88
|
|
87
|
-
```
|
88
89
|
|
89
|
-
######.eslintrc.js
|
90
90
|
```
|
91
|
-
module.exports = {
|
92
|
-
parserOptions: {
|
93
|
-
sourceType: "module",
|
94
|
-
ecmaVersion: 2015,
|
95
|
-
requireConfigFile: false,
|
96
|
-
babelOptions: {
|
97
|
-
presets: ["@babel/preset-react"],
|
98
|
-
},
|
99
|
-
},
|
100
|
-
// parser: "@babel/eslint-parser",
|
101
|
-
env: {
|
102
|
-
browser: true,
|
103
|
-
es6: true,
|
104
|
-
},
|
105
|
-
extends: [
|
106
|
-
// "eslint:recommended",
|
107
|
-
"plugin:@typescript-eslint/recommended",
|
108
|
-
// "plugin:prettier/recommended",
|
109
|
-
// "plugin:react/recommended",
|
110
|
-
],
|
111
|
-
// plugins: ["@typescript-eslint"],
|
112
|
-
parser: "@typescript-eslint/parser",
|
113
|
-
root: true,
|
114
|
-
rules: {
|
115
|
-
"@typescript-eslint/no-unused-vars": "off",
|
116
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
117
|
-
"@typescript-eslint/no-explicit-any": "off",
|
118
|
-
"init-declarations": ["error", "never"],
|
119
|
-
},
|
120
|
-
};
|
121
91
|
|
122
|
-
```
|
123
|
-
|
124
92
|
######tsconfig.json
|
125
93
|
|
126
94
|
```
|
@@ -144,16 +112,93 @@
|
|
144
112
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "functions/lib/index.js"],
|
145
113
|
"exclude": ["node_modules", "functions"]
|
146
114
|
}
|
115
|
+
```
|
147
116
|
|
117
|
+
next.config.js
|
148
118
|
```
|
119
|
+
const environment = process.env.NODE_ENV || "development";
|
120
|
+
const env = require(`./${environment}.env.js`);
|
149
121
|
|
122
|
+
module.exports = {
|
123
|
+
env: {
|
124
|
+
FIREBASE_PROJECT_ID: env.FIREBASE_PROJECT_ID,
|
125
|
+
},
|
150
|
-
|
126
|
+
images: {
|
127
|
+
domains: ["firebasestorage.googleapis.com"],
|
128
|
+
},
|
129
|
+
node: {
|
130
|
+
global: false,
|
131
|
+
__filename: false,
|
132
|
+
__dirname: false,
|
133
|
+
},
|
134
|
+
webpack5: true,
|
135
|
+
// webpack: (config) => {
|
136
|
+
// config.node = {
|
137
|
+
// fs: "empty",
|
138
|
+
// child_process: "empty",
|
139
|
+
// net: "empty",
|
140
|
+
// dns: "empty",
|
141
|
+
// tls: "empty",
|
142
|
+
// };
|
143
|
+
// return config;
|
144
|
+
// },
|
145
|
+
eslint: {
|
146
|
+
// ignoreDuringBuilds: true,
|
147
|
+
},
|
148
|
+
};
|
151
149
|
|
150
|
+
```
|
151
|
+
|
152
|
+
.eslintrc.js
|
153
|
+
|
154
|
+
```
|
155
|
+
module.exports = {
|
156
|
+
env: {
|
157
|
+
browser: true,
|
158
|
+
es6: true,
|
159
|
+
},
|
160
|
+
parser: "@typescript-eslint/parser",
|
161
|
+
parserOptions: {
|
162
|
+
sourceType: "module",
|
163
|
+
ecmaVersion: 2015,
|
164
|
+
requireConfigFile: false,
|
165
|
+
},
|
166
|
+
plugins: ["react", "@typescript-eslint"],
|
167
|
+
extends: [
|
168
|
+
"eslint:recommended",
|
169
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
170
|
+
"plugin:@typescript-eslint/recommended",
|
171
|
+
"plugin:prettier/recommended",
|
172
|
+
"prettier",
|
173
|
+
],
|
174
|
+
root: true,
|
175
|
+
rules: {
|
176
|
+
"@typescript-eslint/no-unused-vars": "off",
|
177
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
178
|
+
"@typescript-eslint/no-explicit-any": "off",
|
179
|
+
"init-declarations": ["error", "never"],
|
180
|
+
"react/prop-types": "off",
|
181
|
+
},
|
182
|
+
};
|
183
|
+
|
184
|
+
```
|
185
|
+
|
186
|
+
|
187
|
+
### 試したこと・現状
|
152
|
-
以下の記事を参考に
|
188
|
+
- 以下の記事を参考に
|
153
189
|
Next.jsのバージョン: 10.0.6
|
154
190
|
webpackのバージョン: 4.46.0 に変更してみましたが変わらずエラーが発生したため元に戻しました。
|
155
191
|
[https://qiita.com/someone7140/items/73e72ef66cd580c850de](https://qiita.com/someone7140/items/73e72ef66cd580c850de)
|
192
|
+
- nodeのバージョンの v14.15.0 , v16.4.0 を試したが変化なし。
|
193
|
+
- node_moduleの削除、再インストール
|
194
|
+
- yarn, npm のキャッシュ削除
|
195
|
+
- webpack4に変更
|
196
|
+
- ローカル環境でのyarn lint , yarn build , yarn devは通ります
|
156
197
|
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
157
202
|
どうかお助けください、、????♀️
|
158
203
|
|
159
204
|
|
1
加筆
title
CHANGED
File without changes
|
body
CHANGED
@@ -154,4 +154,10 @@
|
|
154
154
|
webpackのバージョン: 4.46.0 に変更してみましたが変わらずエラーが発生したため元に戻しました。
|
155
155
|
[https://qiita.com/someone7140/items/73e72ef66cd580c850de](https://qiita.com/someone7140/items/73e72ef66cd580c850de)
|
156
156
|
|
157
|
-
どうかお助けください、、????♀️
|
157
|
+
どうかお助けください、、????♀️
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
また、yarn-error.logというファイルにErrorがあったのですがこれも何か関係あるのでしょうか?
|
162
|
+
|
163
|
+

|