windows 执行这句就可以了,切记管理员权限运行
set NODE_OPTIONS=--openssl-legacy-provider
Compiling…i 「wds」: Project is running at http://192.168.1.100:10086/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from C:\Users\Administrator\Desktop\qsn_taro_h5\dist
i 「wds」: 404s will fallback to /index.html
http://192.168.150.1:10086/
\ Compiling…Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
at C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\loader-runner\lib\LoaderRunner.js:236:3
at runSyncOrAsync (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
at iterateNormalLoaders (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at Array. (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at C:\Users\Administrator\Desktop\qsn_taro_h5\node_modules\graceful-fs\graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
- Compiling…node:internal/crypto/hash:71
this[kHandle] = new _Hash(algorithm, xofLen);
^
library: ‘digital envelope routines’,
reason: ‘unsupported’,
code: ‘ERR_OSSL_EVP_UNSUPPORTED’
}
Node.js v18.12.1