Skip to content
This repository was archived by the owner on Oct 22, 2023. It is now read-only.
This repository was archived by the owner on Oct 22, 2023. It is now read-only.

npm 运行vue项目时,报错:Error: error:0308010C:digital envelope routines::unsupported #6

@pl1998

Description

@pl1998

主要是nodeJs V17版本发布了OpenSSL3.0对算法和秘钥大小增加了更为严格的限制,导致了nodeJs V17之前版本不受影刺而nodeJs V17和之后的版本会出现这个错误。
在 scripts 设置 set NODE_OPTIONS=--openssl-legacy-provider

"scripts": {
    "dev": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve",
    "lint": "eslint --ext .js,.vue src",
    "build:prod": "vue-cli-service build",
    "build:stage": "vue-cli-service build --mode staging",
    "preview": "node build/index.js --preview",
    "new": "plop",
    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
    "test:unit": "jest --clearCache && vue-cli-service test:unit",
    "test:ci": "npm run lint && npm run test:unit"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions