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

@types/ramda is missing, causing type errors #32

Closed
JReinhold opened this issue Jul 3, 2023 · 2 comments
Closed

@types/ramda is missing, causing type errors #32

JReinhold opened this issue Jul 3, 2023 · 2 comments

Comments

@JReinhold
Copy link

It appears that v2.4.1 introduces a type error that is caught in the Storybook CI here, for a PR that upgrades to said version: https://app.circleci.com/pipelines/github/storybookjs/storybook/53837/workflows/8ef6bf7f-46c8-4605-8fa2-f804ed46350c/jobs/552019

It looks like you're exporting types from ramda, but @types/ramda is only set as a devDependency, so it's not present to users (like us) that depends on your library.

This is what's exported: https://www.npmjs.com/package/file-system-cache?activeTab=code

My suggestion would be to bundle with tsup, as that bundles in the types as well. But that might be a bigger task, so moving @types/ramda to a dependency is also an option.

This problem only occurs if skipLibCheck in tsconfig is false, which is the default.

I'm unsure why this problem was only introduced in 2.4.1, and not before.

@philcockfield
Copy link
Owner

philcockfield commented Jul 8, 2023

Hey, thanks @JReinhold.

I've moved @types/ramda into the { dependencies }.

Have republished on NPM as v2.4.2

Please sing out if that does or doesn't resolve this.
Thanks!

ref → PR

philcockfield added a commit that referenced this issue Jul 9, 2023
* update refs

* Move "@types/ramda" to {dependencies}

Issue #32
philcockfield added a commit that referenced this issue Jul 9, 2023
* update refs

* Move "@types/ramda" to {dependencies}

Issue #32

* 2.4.2
@JReinhold
Copy link
Author

Thanks @philcockfield. It seems like the problem has now "moved on" to @types/fs-extra, giving the same error.

https://app.circleci.com/pipelines/github/storybookjs/storybook/54659/workflows/b1907d3b-f0c8-4539-9f94-804d56c8e46e/jobs/555993/parallel-runs/0?filterBy=ALL

I don't think any of the other @types dependencies need to be moved, as they are test related and probably won't be part of the final bundle anyway.

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

2 participants