Typescript Rest API requests are experiencing issues when made with vscode version 1.82.2

Whenever I try to make Rest API calls in Typescript, I encounter the following error: error code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' message: 'unable to get local issuer certificate'

Our API Calls were functioning properly up until vscode version 1.81.1

After upgrading to vscode 1.82.2, I found that setting NODE_TLS_REJECT_UNAUTHORIZED=0 in the command prompt allows the API calls to work, but this bypasses the SSL certificate verification process, which is not ideal. What steps should be taken to resolve the UNABLE_TO_GET_ISSUER_CERT_LOCALLY error with vscode version 1.82.2?

  • VS Code Version: 1.82.2
  • OS Version: Windows 11 Enterprise

Answer №1

To return to version 1.81.1 of VS Code, simply follow these steps.

It's a simple process to revert back to the previous version. Check out the release documentation for versions 1.82.1 and 1.82.2 here: https://code.visualstudio.com/updates/v1_82

Please note that the 1.82.1 update addresses a security issue related to maliciously crafted package.json/.npmrc files. More information available here: https://github.com/microsoft/vscode/issues?q=is%3Aissue+milestone%3A%22August+2023+Recovery+1%22+is%3Aclosed

However, this specific issue may not affect your situation.


After reviewing the release documentation, there seem to be no changes to the NODE_TLS_REJECT_UNAUTHORIZED setting. It's possible the issue lies elsewhere. Consider the following troubleshooting steps:

  • Perform a clean installation of VS Code
  • Verify that the VS Code system configurations are accurate
  • Check for potential CORS issues in your API code (based on the information provided, this seems unlikely to be the root cause)

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Transforming numbers into arrays in JavaScript/TypeScript for Angular 7

What is the best way to convert the number 10 into an array in JavaScript? expected output: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] OR How can I transform the number 10 into the number of items within an array using JavaScript? ...

Is it feasible to update just one key within an exported type using setState in TypeScript?

Recently, I decided to dive into Typescript within my React App and encountered an error that has left me stumped. I'm wondering if it's possible to access a specific key in an exported type and modify its value? Here is how I've exported ...

Guide on packaging an Angular 2 Typescript application with Gulp and SystemJS

In my Angular 2 project, I am using Typescript with SystemJS for module loading and Gulp as a task runner. Currently, the project is running on Angular RC2 but the same issue persists with RC1. I followed the steps provided in brando's answer here. U ...

What is the best way to invoke a function in a class from a different class in Angular 6?

Below is the code snippet: import { Component, OnInit, ViewChild } from '@angular/core'; import { AuthService } from '../core/auth.service'; import { MatRadioButton, MatPaginator, MatSort, MatTableDataSource } from '@angular/mater ...

deleting the existing marker before placing a new marker on the Mapbox

Upon the map loading with GeoJson data, I have implemented code to display markers at specified locations. It works flawlessly, but I am seeking a way to remove previous markers when new ones are added. What adjustments should be made for this desired func ...

Differentiating elements from two array objects in typescript: a guide

I am facing an issue in extracting the different elements from two array objects. Here is my example: array1 = [{id: 1, a: "a", b: "b"}, {id: 2, c: "c", d: "d"}, {id: 3, e: "e", f: "f"}]; array2 = ...

What could be causing the error related to "Implicit any return type" in this situation?

I expect the code below to pass the type check successfully: class MyClass<T extends object, P extends string = string> { method(thing: Thing) { return thing.method(this); } } declare class Thing { method(entity: MyClass<any&g ...

Validators in Angular forms are a powerful tool for enforcing

Is it possible to use Validators in the ts.file to display an error message when a field is invalid, rather than directly in the html? Thanks. html <form [formGroup]="form"> <mat-form-field> <mat-label>Nom</mat-label> ...

Material 3 Web Components definitions for SolidJS

Struggling with integrating the official Material 3 Web Components into SolidJS. Visit this link for more information. The main hurdle has been encountering typescript errors despite being able to see the components on the page. In my index.tsx, I'v ...

How can a child component trigger an event in its parent component?

Currently, I have tabs implemented with a form and a button in tab1. In the parent component, there is an event that deactivates the current tab and activates the next one. Can anyone advise on how to call this event from the child component? gotosecond ...

Problem with Angular 2 Typings Paths in Typescript

Currently, I am in the process of learning how to create a Gulp build process with Angular 2 and Typescript. Following the Quick Start guide has allowed me to get everything up and running smoothly. However, I have decided to experiment with different fold ...

What is the correct syntax for declaring a variable within a switch statement in TypeScript?

How can I properly use a switch statement in TypeScript to assign a new variable a value? For example: let name: string switch(index) { case 0: name = "cat" case 1: name = "dog" .... } I keep getting the err ...

`Angular 9 template directives`

I am facing an issue with my Angular template that includes a ng-template. I have attempted to insert an embedded view using ngTemplateOutlet, but I keep encountering the following error: core.js:4061 ERROR Error: ExpressionChangedAfterItHasBeenCheckedEr ...

Issue in VS Code installation - eslint

When attempting to install eslint using the command "npm i eslint," I encountered the error message "`-- [email protected] extraneous" As a newcomer to npm and VS Code, I have successfully installed various extensions without any issues. However, in ...

What could be the reason my component is not displaying the ContentChild associated with a directive?

It appears that utilizing a directive to target a content child from another directive is the recommended approach (source). However, why isn't my component able to recognize the component marked with the directive? ./my.component.ts import { Comp ...

What is the best way to avoid passing a value to a component in nextjs?

I'm trying to make this component static and reusable across different pages without passing a parameter when calling it. Is there a way to achieve this while following the official documentation? component: import { GetStaticProps, InferGetServerSid ...

There seems to be an issue with the type error regarding the return of the mysql2/promise

As I delve into using the mysql2/promise library with Typescript, I've encountered a puzzling issue regarding the return type of the query method. Despite my best efforts, I can't seem to resolve an error in my code. Here is a snippet from my c ...

Error in Typescript stating that the property 'children' is not found on the imported interface of type 'IntrinsicAttributes & Props'

When I try to import an interface into my Card component and extend CardProps, a yarn build (Typescript 4.5.4) displays the following error: Type error: Type '{ children: Element[]; className: string; border: true; disabled: boolean; }' is not as ...

Having trouble receiving a blob response using HttpClient POST request in Angular 9?

I'm encountering an issue while attempting to receive a zip file as a blob from an HTTP POST request. However, the resolved post method overload is not what I expected. const options = { responseType: 'blob' as const }; Observable<Blob ...

Tips on making a forced call to `super.ngOnDestroy`

I am utilizing an abstract class to prevent redundant code for unsubscribing observables. Here is what it looks like: export abstract class SubscriptionManagmentDirective implements OnDestroy { componetDestroyed = new Subject<void>() constructor ...