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

Typescript declaration file confusion #25

Closed
jf-t opened this issue Jul 21, 2020 · 6 comments
Closed

Typescript declaration file confusion #25

jf-t opened this issue Jul 21, 2020 · 6 comments

Comments

@jf-t
Copy link

jf-t commented Jul 21, 2020

Running a production build of our Typescript application is now showing me:

Could not find a declaration file for module '@braintree/sanitize-url'. '/usr/src/app/node_modules/@braintree/sanitize-url/dist/index.js' implicitly has an 'any' type.

In the console log and I am unable to run a build. I originally had the DefinitelyTyped package installed, which was recently overwritten as you are including a dist folder.

From what I see, node is trying to read index.js file for some reason, when it should be reading index.d.ts? but I am not sure a way around this. I have version 4.1.0 installed, and it seemingly works for me locally, but only fails when running a production build.

@crookedneighbor
Copy link
Contributor

Can you make a sample repo that reproduces the problem?

@jf-t
Copy link
Author

jf-t commented Jul 21, 2020

Sorry I don't have time currently to do that - I forced my package back to version 4.0.1 and the issue went away so I am sure this is the problem. When I have a few hours to spend I will make a sample repo and try to reproduce it that way, sorry about that.

@crookedneighbor
Copy link
Contributor

I was able to reproduce locally. Looking into fixing it up.

@crookedneighbor
Copy link
Contributor

Fixed in v4.1.1

@jf-t
Copy link
Author

jf-t commented Jul 22, 2020

Thank you! @crookedneighbor I will try our site to use 4.1.1 tomorrow.

@jf-t
Copy link
Author

jf-t commented Jul 24, 2020

This fixed it 👍

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