TypeError: url_1.URL is not a constructor
shefaligoel136 opened this issue · 2 comments
While using the function:
await hubSpotClient.crm.contacts.basicApi.create({
properties,
associations: [],
});
This is the error I see.
TypeError: url_1.URL is not a constructor
at new RequestContext (http.js:54:1)
at ServerConfiguration.makeRequestContext (servers.js:25:1)
at BasicApiRequestFactory.eval (BasicApi.js:50:1)
at Generator.next ()
at eval (BasicApi.js:8:1)
at new Promise ()
at __awaiter (BasicApi.js:4:1)
at BasicApiRequestFactory.create (BasicApi.js:44:1)
at ObservableBasicApi.create (ObservableAPI.js:29:1)
at PromiseBasicApi.create (PromiseAPI.js:14:1)
Hi @shefaligoel136 .
What version of the SDK do you use?
Hi, on our side we had this on a React application. The cause of the error was running the code on client side. Running the code server side solved the issue.