Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsd package problematic in serverless projects #819

Closed
micheleangioni opened this issue Jun 10, 2021 · 5 comments
Closed

tsd package problematic in serverless projects #819

micheleangioni opened this issue Jun 10, 2021 · 5 comments

Comments

@micheleangioni
Copy link

Dear team,
I've noticed that fairly recently this application included tsd into the dependencies of the project.

This has terrible consequences for our projects, because we use it in some AWS lambdas. As you probably know, the lambdas have size limits of the code they can contain. This includes the node_modules folder of course.

The problem is that tsd has an enormous size

image

and creates big problems when trying to deploy our lambdas in AWS, forcing us to use unpleasant workarounds.

Moving tsd to the devDependencies would already fix the problem, as it would be dropped when packaging the lambdas. If not possible, I really invite you to consider using a lighter alternative.

Thanks

@denysoblohin-okta
Copy link
Contributor

Thanks for submitting this issue.
Internal ref: https://oktainc.atlassian.net/browse/OKTA-403207

@shuowu
Copy link
Contributor

shuowu commented Jun 10, 2021

@micheleangioni Thanks for reporting the issue! The tsd module is used only for type testing, and it should belong to the devDependencies. Just wondering which version of okta-auth-js are you using, then we can release a patch for it.

@micheleangioni
Copy link
Author

Hi @shuowu ,
thanks for the very fast answer :)

We include in our package.json the version 2.1.0 of @okta/jwt-verifier

image

It then brings this chain of dependencies:

image

@shuowu
Copy link
Contributor

shuowu commented Jun 24, 2021

@micheleangioni @okta/jwt-verifier v2.2.0 which removed the dependency of @okta/configuration-valiadation has been released on npm. It should also resolves the tsd issue for your case.

Meanwhile, we are also working on move tsd to devDependencies in okta-auth-js. PR can be tracked #839

@micheleangioni
Copy link
Author

Thank you very much @shuowu :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants