私はギャツビーサイト。Node.jsをアップグレードしてバージョン17.0.1ビルドを実行すると、エラーが発生します。
Error: digital envelope routines::unsupported
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
v16 にダウングレードすると正常に動作し、ビルドも成功します。どうすればこれを修正できますか?
Google で調べてみると、次のような同様の問題があるようです:エラー: エラー:06065064: デジタル エンベロープ ルーチン:EVP_DecryptFinal_ex: 不正な復号化 #48
ベストアンサー1
これは役に立つかもしれません。これらのスクリプトをパッケージ.jsonファイル。
反応:
"scripts": {
"start": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
"build": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build"
}
Windows
をオンにして を使用している場合は、次のようにスクリプトでの代わりにReact.js
を使用できます。set
export
"scripts": {
"start": "set SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
"build": "set SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build"
}
または
"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
}
Vue.js:
"scripts": {
"serve": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"lint": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint"
},
Windows
をオンにして を使用している場合は、次のようにスクリプトでの代わりにVue.js
を使用できます。set
export
"scripts": {
"serve": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"lint": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint"
},
または
"scripts": {
"serve": "vue-cli-service --openssl-legacy-provider serve",
"build": "vue-cli-service --openssl-legacy-provider build",
"lint": "vue-cli-service --openssl-legacy-provider lint"
},
角度:
"scripts": {
"start": "set NODE_OPTIONS=--openssl-legacy-provider && gulp buildDev && ng serve ",
"publish": "set NODE_OPTIONS=--openssl-legacy-provider && gulp build && ng build --prod",
},