npm run build报错error:03000086:digital envelope routines::initialization error
时间: 2023-09-22 10:12:43 浏览: 260
npm-build-jar:创建 JAR 文件
5星 · 资源好评率100%
根据引用中的信息,报错"error:03000086:digital envelope routines::initialization error"是由于不支持的加密算法导致的。根据引用和引用的建议,可以尝试在执行"npm run build"之前设置环境变量NODE_OPTIONS为"--openssl-legacy-provider"来解决这个问题。具体操作步骤如下:
1. 打开命令行终端。
2. 输入以下命令来设置环境变量:set NODE_OPTIONS=--openssl-legacy-provider
3. 然后再执行"npm run build"命令。
这样设置环境变量后,应该能够解决报错"error:03000086:digital envelope routines::initialization error"的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [输入npm run dev报错“ensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization...](https://blog.csdn.net/qq_42294095/article/details/130376434)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [vue-cli运行npm run serve报错error:03000086:digital envelope routines::initialization error解决方法](https://blog.csdn.net/qq_59741238/article/details/128374005)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文