Arnaud
Arnaud

Reputation: 161

electron: --openssl-legacy-provider is not allowed in NODE_OPTIONS

I want create electron app with vue js but I can't start : I execute this code for run my app : "cross-env NODE_OPTIONS='--openssl-legacy-provider' vue-cli-service electron:serve"

Return an error : electron: --openssl-legacy-provider is not allowed in NODE_OPTIONS

I have tried to change node version (18.2.1 / 18.2.0 / 19.2.0 / 17.9.1) It's same

More information :

  "dependencies": {
    "core-js": "^3.8.3",
    "cross-env": "^7.0.3",
    "vue": "^3.2.13"
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "electron": "^13.0.0",
    "electron-devtools-installer": "^3.1.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3",
    "vue-cli-plugin-electron-builder": "~2.1.1"
  },

Upvotes: 3

Views: 7170

Answers (1)

Paul F. Wood
Paul F. Wood

Reputation: 1775

The solution for me was to remove usages of --openssl-legacy-provider wherever Electron might see it. However, webpack then demanded it, otherwise creating an error message error:0308010C:digital envelope routines::unsupported.

So make sure that any Node scripts that webpack uses includes node --openssl-legacy-provider and it worked for me.

This seems to be a problem with Node > 16.

Upvotes: 1

Related Questions