运行npm run dev提示错误'error:03000086:digital envelope routines::initialization error'
在package.json更改scripts
你可以在 package.json 文件中更改 scripts,将 SET NODE_OPTIONS=–openssl-legacy-provider && vue-cli-service serve 添加到 dev 命令中,如下所示:"dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
这样,在执行 npm run dev 命令时,Node.js 就会自动设置 NODE_OPTIONS 环境变量,并启用 OpenSSL 1.0.x 的兼容模式,从而避免 opensslErrorStack 错误的出现。
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »