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

How to fix TS7016 : Typedef not found 404 #24745

Closed
theapache64 opened this issue Jun 7, 2018 · 5 comments
Closed

How to fix TS7016 : Typedef not found 404 #24745

theapache64 opened this issue Jun 7, 2018 · 5 comments
Labels
Question An issue which isn't directly actionable in code

Comments

@theapache64
Copy link

theapache64 commented Jun 7, 2018

I am new in react, and I've been doing a project with Flow. Last night i met TypeScript. It's awesome. I've decided to migrate to TypeScript from Flow and have been converting my .js/.jsx files to .ts/.tsx. I've installed type definitions for react, redux etc. But i can't find type definition for a library called react-native-material-color. It's not a famous library and am getting below error. How can i fix the error ?

image

@j-oliveras
Copy link
Contributor

Like the message says: create a file with extension .d.ts (for example non-typed-npm-modules.d.ts) with contents declare module 'react-native-material-color' (if other modules has the same problem you can add them into the same file).

For questions, it is better to ask at stackoverflow with typescript tag.

@theapache64
Copy link
Author

theapache64 commented Jun 7, 2018

@j-oliveras I've asked in SO , no response, so i asked here.

Create that file in project root dir ? or under node_modules/@types?

@j-oliveras
Copy link
Contributor

Put it inside your project dir.

@theapache64
Copy link
Author

Now the auto-completion on that class is not working.

@mhegazy mhegazy added the Question An issue which isn't directly actionable in code label Jun 7, 2018
@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

4 participants