You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had issues running this library on Vercel serverless functions for a few months now, documented in #54 and #96.
I just upgraded to box-typescript-sdk-gen@1.0.0 and am still getting the same issue, with a third library this time:
Cannot find module 'proxy-agent'
However, this time I tried patching the library, and replacing all calls to eval('require') with simply require (such as on this line) and this seems to have fixed all of my issues.
Are you able to do this across this codebase? Curious, what was the reason for using eval('require') in the first place?
The reason why we are using this eval('require') instead of require is to make it compatible with some frontend frameworks, while these frameworks are not using the libraries above but still trying to resolve it.
We will soon change it back to require but we need to figure out whether the frontend framework should use polyfills to override the missing library by their side or if we will have a custom version of the TS SDK for the browser only.
Description of the Issue
I've had issues running this library on Vercel serverless functions for a few months now, documented in #54 and #96.
I just upgraded to
box-typescript-sdk-gen@1.0.0
and am still getting the same issue, with a third library this time:However, this time I tried patching the library, and replacing all calls to
eval('require')
with simplyrequire
(such as on this line) and this seems to have fixed all of my issues.Are you able to do this across this codebase? Curious, what was the reason for using
eval('require')
in the first place?Versions Used
Typescript SDK: v1.0.0
Platform: Node.js
Node.js (if applicable): 20.13.1
The text was updated successfully, but these errors were encountered: