Select to view content in your preferred language

RequestCredentials not found when using @esri/arcgis-rest-request

134
0
05-10-2024 12:42 AM
Cmeng
by
New Contributor

Hi there,

I am building an node js application using typescript 5.4.5 and i am using @esri/arcgis-rest-request to try to get the access token from acrgis.

But i am hit with 

node_modules/@esri/arcgis-rest-request/dist/esm/utils/IAuthenticationManager.d.ts:36:41 - error TS2304: Cannot find name 'RequestCredentials'.

and also

node_modules/@esri/arcgis-rest-request/dist/esm/utils/ITokenRequestOptions.d.ts:7:21 - error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?

when i am trying to import 'request' from the module.

I wanted to ask if there is anyway to fix this? I have tried downgrading my typescript version to 4.2.x and 4.5.x but to no avail.

Any help or advice is greatly appreciated.

Thanks in advance.

0 Kudos
0 Replies