Skip to content

Running Code Via Cli Triggers Error: --openssl-legacy-provider is not allowed in NODE_OPTIONS #136599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mahdi-farnia opened this issue Nov 7, 2021 · 3 comments
Assignees

Comments

@mahdi-farnia
Copy link

Issue Type: Bug

For using webpack server in node 17 i added this veriable to Environment Vars: ( At least this command helps me to run react app in node 17 )
--openssl-legacy-provider via this command:

$ export NODE_OPTIONS=--openssl-legacy-provider

Then i faced to this problem:
Node Version: 17.0.1

$ code .
/Applications/Visual Studio Code.app/Contents/MacOS/Electron: --openssl-legacy-provider is not allowed in NODE_OPTIONS

I recently reported this issue #136586 maybe there is a similar problem that may help...

VS Code version: Code 1.62.0 (b3318bc, 2021-11-03T15:24:41.297Z)
OS version: Darwin x64 21.1.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz (8 x 2400)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 11, 9, 7
Memory (System) 8.00GB (0.15GB free)
Process Argv --crash-reporter-id 3abd098e-8913-45d9-9e68-58217d58edc2
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30384386
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
vsccppwtct:30382698
bridge0708:30335490
pygetstartedt3:30385195
dockerwalkthru:30377721
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsqsis200:30386379
vsaa593cf:30376535
vssld246cf:30386378

@sanjibpaul59
Copy link

sanjibpaul59 commented Nov 8, 2021

unset NODE_OPTIONS in the command line solved the command line issue for me. (For the current session)
If you are using docker, use node:14 or node:16 instead of node:alpine in your client Dockerfile.

@weinand weinand assigned connor4312 and unassigned weinand Nov 8, 2021
@mahdi-farnia
Copy link
Author

unset NODE_OPTIONS in the command line solved the command line issue for me. (For the current session)

If you are using docker, use node:14 or node:16 instead of node:alpine in your client Dockerfile.

Actually the problem is node 17 and webpack. I opened this issue for solving this problem with vsCode.

Finally may someone needs to update node to 17 and uses webpack as well.
It's not annoying or something really special but it's a bug...

@deepak1556
Copy link
Collaborator

deepak1556 commented Nov 8, 2021

NODE_OPTIONS filtering is performed by the runtime https://github.com/electron/electron/blob/main/docs/api/environment-variables.md#node_options , vscode does not control it and the filtering helps from misusing the application. Unset it before launching the application.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@deepak1556 @weinand @connor4312 @mahdi-farnia @sanjibpaul59 and others