若依框架-前端使用教程

1 使用  npm run dev  命令执行本机开发测试时,提出错误信息如下:

  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'

若依框架-前端使用教程_第1张图片

解决方案: 经过查看是原来是因为node.js的版本太高了,使用如下命令解决此问题 ,此方法已测试通过

 set NODE_OPTIONS=--openssl-legacy-provider
  "scripts": {
    "dev": "vue-cli-service serve",
    "build:prod": "vue-cli-service build",
    "build:stage": "vue-cli-service build --mode staging",
    "preview": "node build/index.js --preview",
    "lint": "eslint --ext .js,.vue src"
  },

#修改为
  "scripts": {
    "dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
    "build:prod": "vue-cli-service build",
    "build:stage": "vue-cli-service build --mode staging",
    "preview": "node build/index.js --preview",
    "lint": "eslint --ext .js,.vue src"
  },

使用如下图所示的操作,未能成功,目前未找到好的办法解决 

若依框架-前端使用教程_第2张图片

你可能感兴趣的:(若依框架,前端框架,vue.js)