question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

install-extension command throws Buffer deprecated warning

See original GitHub issue

Issue Type: Bug

PS C:\Users\sagavale> & 'C:\Users\sagavale\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd' --version
1.39.0
9df03c6d6ce97c6645c5846f6dfa2a6a7d276515
x64
PS C:\Users\sagavale> & 'C:\Users\sagavale\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd' --install-extension ecmel.vscode-html-css                                                                                                                            Installing extensions...
Installing extension 'ecmel.vscode-html-css' v0.2.3...
(node:336) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'ecmel.vscode-html-css' v0.2.3 was successfully installed.

I have verified that the warning does NOT occur in version 1.36.0 in which similar issue #67534 was fixed.

VS Code version: Code 1.39.0 (9df03c6d6ce97c6645c5846f6dfa2a6a7d276515, 2019-10-09T06:58:04.439Z) OS version: Windows_NT x64 10.0.19500

System Info
Item Value
CPUs Intel® Xeon® CPU E5-1650 v3 @ 3.50GHz (12 x 3492)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.91GB (7.99GB free)
Process Argv –folder-uri file:///d%3A/code/devcanvas/client/VSCodeExtension
Screen Reader no
VM 0%
Extensions (5)
Extension Author (truncated) Version
vscode-html-css ecm 0.2.3
devinsights Mic 2019.10.11-1
cpptools ms- 0.25.1
vscode-typescript-tslint-plugin ms- 1.2.2
debugger-for-chrome msj 4.12.0

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:23
  • Comments:27 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
alanaudicommented, Jun 8, 2022

@Matthew-Cherry87 @Space7Panda

It seems that just exporting one of --no-deprecation, --no-warnings, and --throw-deprecation could mute the annoying deprecation warning now.

Here is my installation script

export NODE_OPTIONS="--no-deprecation" && cat path-to-extension-list | xargs -L 1 code --install-extension

Installing extensions...
Installing extension 'casualjim.gotemplate'...
Extension 'casualjim.gotemplate' v0.4.0 was successfully installed.
2reactions
Matthew-Cherry87commented, Jul 9, 2022

@jdstraye AFAIK the deprecation warning is only a warning, and only appears when installing using the CLI or when developing extensions. I wouldn’t expect any extension to fail because of it. More likely the latest versions of some extension won’t install on your older VS Code version.

Sure, but what if you’re in an enterprise environment and want to push out Visual Studio Code + XYZ extensions to 100s or 1000s of workstations and regularly update said extensions.

From memory, the warning output also pauses the installation of extensions until the user inputs any key into the console window…

All I want is the ability to install extensions via CLI without errors/warnings/additional console windows popping up.

That’s hardly an unreasonable request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vscode extension: deprecation warning `Buffer()`, how to ...
When I do that command in the main VS Code instance I close the [Extension Development Host]. This makes the debug console clear...
Read more >
Node.js v19.3.0 Documentation
The --zero-fill-buffers command-line option; What makes Buffer. ... WARNING: This does not throw an AssertionError in legacy assertion mode! assert.
Read more >
QRadar APARs 101 - IBM
QRadar information related to known issues, important alerts and problem ... used by IBM QRadar SIEM is vulnerable to buffer overflow and denial...
Read more >
Deprecated APIs | Node.js v18 API
When the --throw-deprecation command-line flag is used, ... This means there will not be deprecation warnings for Buffer() usage in dependencies.
Read more >
Index (Oracle® Coherence Java API Reference) - Oracle Help Center
AbstractBufferManager (int, int) - Constructor for class com.tangosol.io.nio. ... ElementList: Overrides the ArrayList implementation to force this throw the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found