npm run dev
報錯:
\node_modules\webpack\hot\dev-server.jsnode:internal/crypto/hash:71
? this[kHandle] = new _Hash(algorithm, xofLen);
Error: error:0308010C:digital envelope routines::unsupported
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
? library: 'digital envelope routines',
? reason: 'unsupported',
? code: 'ERR_OSSL_EVP_UNSUPPORTED'
Node.js v18.16.1
原因:
node18不兼容openssl.
解決方案:
-卸載nodejs 18.
-到nodejs官網下載v16.20.2,并安裝。
Index of /download/release/latest-v16.x/
-重啟vs code,運行 npm run dev