Vue:打包报Building for staging...Error: error:0308010C:digital envelope routines::unsupported

项目场景:Vue使用npm run build后报Building for staging…Error: error:0308010C:digital envelope routines::unsupported

问题描述

当我们需要对项目进行打包上线的时候出现的Building for staging…Error: error:0308010C:digital envelope的报错信息
在这里插入图片描述


原因分析:

出现这个错误是因为 node.js V17版本中最近发布的OpenSSL3.0, 而OpenSSL3.0对允许算法和密钥大小增加了严格的限制,可能会对生态系统造成一些影响.


解决方案:

在网上存在多种解决方案,我这边成功解决的方案是降低node的版本

1.切换前本地版本

在这里插入图片描述

2.切到node16.0以下版本

在这里插入图片描述

3切换node版本的工具使用的是nvm来管理node

自行去查找如何切换node的版本 nvm安装推荐地址 https://blog.csdn.net/m0_64697285/article/details/127318141

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Revision 8 Ready to Master Vue.js? What if you could master the entire framework – with solid foundations – in less time without beating your head against a wall? Imagine how quickly you could work if you knew the best practices and the best tools? Stop wasting your time searching and have everything you need to be productive in one, well-organized place, with complete examples to get your project up without needing to resort to endless hours of research. Lots of Sample Apps and Code You will learn what you need to know to work professionally with Fullstack Vue: The Complete Guide to Vue.js You’ll build: A Server-Persisted Shopping Cart: Use the Flux-like library Vuex to manage data for a large shopping cart application that persists information on to a local server. A Calendar Event App: Dive deeper into component based architecture by learning how simple state management works with Vue Single-file components. A Voting Application: Learn how to render dynamic components and use standard Vue directives to build an interactive voting application. Forms with Validations: Build powerful forms that accept user input, and give clear messaging when the input is of an invalid format. Vuex-based Routes and Authentication: Build on top of the server persisted shopping cart app by creating dynamic routes and a token authentication flow with the official vue-router library. Build bullet-proof apps with Testing: Use Vue’s official test utility library, vue-test-utils, to create meaningful tests for a daily weather app that interacts with a third party API.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值