回答編集履歴
1
コード追加
answer
CHANGED
@@ -8,4 +8,48 @@
|
|
8
8
|
```shell
|
9
9
|
cd hello-react
|
10
10
|
```
|
11
|
-
しないとだめですよ。
|
11
|
+
しないとだめですよ。
|
12
|
+
|
13
|
+
### 追記
|
14
|
+
|
15
|
+
当該のエラーが発生した後、`rm -rf node_modules/` 、 `rm -f yarn.lock`してから、`yarn install` して、 `yarn start` したところ、以下のような別のエラーが発生しました。
|
16
|
+
```
|
17
|
+
Starting the development server...
|
18
|
+
|
19
|
+
/Users/kilesa/WebstormProjects/teratail/qa366330/node_modules/react-scripts/scripts/start.js:19
|
20
|
+
throw err;
|
21
|
+
^
|
22
|
+
|
23
|
+
Error: error:0308010C:digital envelope routines::unsupported
|
24
|
+
at new Hash (node:internal/crypto/hash:67:19)
|
25
|
+
at Object.createHash (node:crypto:130:10)
|
26
|
+
at module.exports
|
27
|
+
|
28
|
+
・・・
|
29
|
+
|
30
|
+
|
31
|
+
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
|
32
|
+
library: 'digital envelope routines',
|
33
|
+
reason: 'unsupported',
|
34
|
+
code: 'ERR_OSSL_EVP_UNSUPPORTED'
|
35
|
+
}
|
36
|
+
|
37
|
+
Node.js v17.0.1
|
38
|
+
error Command failed with exit code 1.
|
39
|
+
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
|
40
|
+
```
|
41
|
+
|
42
|
+
これの原因と対策を調べてみると、すぐに見つかったのは以下です。
|
43
|
+
|
44
|
+
- [[Solved] Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported](https://exerror.com/failed-to-construct-transformer-error-error0308010cdigital-envelope-routinesunsupported/)
|
45
|
+
|
46
|
+
この記事曰く
|
47
|
+
|
48
|
+
> Simplest and easiest solution is Just downgrade node to v14.18.1.
|
49
|
+
|
50
|
+
とのことで、node のバージョンを v14.18.1 に下げましょうとのことです。
|
51
|
+
ちなみに、React、フロントエンド周辺を業務でけっこうやってきましたが、その肌感覚で、すごくざっくりした言い方になりますが、
|
52
|
+
|
53
|
+
**最新のものを組み合わせた場合、うまく動いたらラッキー(すんなり動かない方が当たり前)**
|
54
|
+
|
55
|
+
ぐらいでいたほうが精神衛生上良いです。
|