'How to fix this error when I am creating vscode extention

npm WARN deprecated [email protected]: this library is no longer supported

npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142



Solution 1:[1]

None of the messages are errors, but warnings and you will probably not be able to fix them. It depends on where the mentioned modules are imported from. If you have dependencies to them, you can easily use a later version, with those problems fixed. But more likely they are 4th party dependencies, which would require to get a newer version of your 3rd party dependencies (if there's any) that hopefully links to newer version of the 4th party deps.

Another possible solution is to add an own (3rd party) dependency in your package.json to newer versions of these libraries. They are automatically deduped by NPM, but might cause trouble with the 3rd libraries that use them.

So, if you are unsure what to do, you can ignore the warnings for now and keep your 3rd party list dependencies updated, in the hope that those libs sooner or later are updated to use a newer 4th party lib.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mike Lischke