Skip to content

Commit

Permalink
Support Node 17 or higher for development
Browse files Browse the repository at this point in the history
Node 17 fixed a security issue related to crypto which is incompatible
with the current default settings of webpack used via react-scripts.
This is unfortunate and this change thus adds a special node commandline
argument to make Node 17 use the previous behavior.

Reference: facebook/create-react-app#11562
  • Loading branch information
longsleep committed May 11, 2023
1 parent e1c9abe commit 4a19e58
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 3 deletions.
3 changes: 2 additions & 1 deletion identifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"start": "if-node-version '>= 17' && react-scripts --openssl-legacy-provider start || react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
Expand All @@ -54,6 +54,7 @@
"eslint-plugin-i18next": "^5.2.1",
"i18next-conv": "^12.1.1",
"i18next-parser": "^5.4.0",
"if-node-version": "^1.1.1",
"source-map-explorer": "^1.8.0"
},
"jest": {
Expand Down
68 changes: 66 additions & 2 deletions identifier/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6203,6 +6203,17 @@ __metadata:
languageName: node
linkType: hard

"cross-spawn@npm:^5.0.1":
version: 5.1.0
resolution: "cross-spawn@npm:5.1.0"
dependencies:
lru-cache: ^4.0.1
shebang-command: ^1.2.0
which: ^1.2.9
checksum: 726939c9954fc70c20e538923feaaa33bebc253247d13021737c3c7f68cdc3e0a57f720c0fe75057c0387995349f3f12e20e9bfdbf12274db28019c7ea4ec166
languageName: node
linkType: hard

"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
Expand Down Expand Up @@ -9020,6 +9031,7 @@ __metadata:
i18next-http-backend: ^1.4.4
i18next-parser: ^5.4.0
i18next-resources-to-backend: ^1.0.0
if-node-version: ^1.1.1
query-string: ^7.1.1
react: ^17.0.2
react-dom: ^17.0.2
Expand Down Expand Up @@ -9047,6 +9059,18 @@ __metadata:
languageName: node
linkType: hard

"if-node-version@npm:^1.1.1":
version: 1.1.1
resolution: "if-node-version@npm:1.1.1"
dependencies:
cross-spawn: ^5.0.1
semver: ^5.2.0
bin:
if-node-version: bin/index.js
checksum: 56f59ebfebe9d76421d141b9d218506022e71473977baf963166879645d84d17b3248386269644b7ae7c5ac9409cfb7f29fe1c1e08d35bb35ac1d16de10b9b19
languageName: node
linkType: hard

"ignore@npm:^5.2.0":
version: 5.2.0
resolution: "ignore@npm:5.2.0"
Expand Down Expand Up @@ -10761,6 +10785,16 @@ __metadata:
languageName: node
linkType: hard

"lru-cache@npm:^4.0.1":
version: 4.1.5
resolution: "lru-cache@npm:4.1.5"
dependencies:
pseudomap: ^1.0.2
yallist: ^2.1.2
checksum: 4bb4b58a36cd7dc4dcec74cbe6a8f766a38b7426f1ff59d4cf7d82a2aa9b9565cd1cb98f6ff60ce5cd174524868d7bc9b7b1c294371851356066ca9ac4cf135a
languageName: node
linkType: hard

"lru-cache@npm:^6.0.0":
version: 6.0.0
resolution: "lru-cache@npm:6.0.0"
Expand Down Expand Up @@ -12913,6 +12947,13 @@ __metadata:
languageName: node
linkType: hard

"pseudomap@npm:^1.0.2":
version: 1.0.2
resolution: "pseudomap@npm:1.0.2"
checksum: 856c0aae0ff2ad60881168334448e898ad7a0e45fe7386d114b150084254c01e200c957cf378378025df4e052c7890c5bd933939b0e0d2ecfcc1dc2f0b2991f5
languageName: node
linkType: hard

"psl@npm:^1.1.33":
version: 1.8.0
resolution: "psl@npm:1.8.0"
Expand Down Expand Up @@ -14003,7 +14044,7 @@ __metadata:
languageName: node
linkType: hard

"semver@npm:^5.4.1, semver@npm:^5.5.0":
"semver@npm:^5.2.0, semver@npm:^5.4.1, semver@npm:^5.5.0":
version: 5.7.1
resolution: "semver@npm:5.7.1"
bin:
Expand Down Expand Up @@ -14140,6 +14181,15 @@ __metadata:
languageName: node
linkType: hard

"shebang-command@npm:^1.2.0":
version: 1.2.0
resolution: "shebang-command@npm:1.2.0"
dependencies:
shebang-regex: ^1.0.0
checksum: 9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908
languageName: node
linkType: hard

"shebang-command@npm:^2.0.0":
version: 2.0.0
resolution: "shebang-command@npm:2.0.0"
Expand All @@ -14149,6 +14199,13 @@ __metadata:
languageName: node
linkType: hard

"shebang-regex@npm:^1.0.0":
version: 1.0.0
resolution: "shebang-regex@npm:1.0.0"
checksum: 404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372
languageName: node
linkType: hard

"shebang-regex@npm:^3.0.0":
version: 3.0.0
resolution: "shebang-regex@npm:3.0.0"
Expand Down Expand Up @@ -15861,7 +15918,7 @@ __metadata:
languageName: node
linkType: hard

"which@npm:^1.3.1":
"which@npm:^1.2.9, which@npm:^1.3.1":
version: 1.3.1
resolution: "which@npm:1.3.1"
dependencies:
Expand Down Expand Up @@ -16199,6 +16256,13 @@ __metadata:
languageName: node
linkType: hard

"yallist@npm:^2.1.2":
version: 2.1.2
resolution: "yallist@npm:2.1.2"
checksum: 9ba99409209f485b6fcb970330908a6d41fa1c933f75e08250316cce19383179a6b70a7e0721b89672ebb6199cc377bf3e432f55100da6a7d6e11902b0a642cb
languageName: node
linkType: hard

"yallist@npm:^4.0.0":
version: 4.0.0
resolution: "yallist@npm:4.0.0"
Expand Down

0 comments on commit 4a19e58

Please sign in to comment.