Could not find a declaration file for module '@baronha/react-native-multiple-image-picker'.
See original GitHub issueIDE: VScode
Language: Typescript
Workflow: Expo (SDK 41)
How it occurred:
yarn add @baronha/react-native-multiple-image-picker
- write
import MultipleImagePicker from "@baronha/react-native-multiple-image-picker";
in my code - raised a problem
Problem detail:
Could not find a declaration file for module ‘@baronha/react-native-multiple-image-picker’. ‘/myproject/node_modules/@baronha/react-native-multiple-image-picker/lib/commonjs/index.js’ implicitly has an ‘any’ type.
Try npm i --save-dev @types/baronha__react-native-multiple-image-picker
if it exists or add a new declaration (.d.ts) file containing `declare module ‘@baronha/react-native-multiple-image-picker’;
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Could not find a declaration file for module 'module-name ...
Here are two other solutions. When a module is not yours - try to install types from @types : npm install -D @types/module-name....
Read more >How to fix error TS7016: Could not find a declaration file for ...
Try `npm install @types/XYZ` if it exists or add a new declaration (.d.ts) file containing `declare module 'XYZ';. If XYZ is a direct...
Read more >Could not find a declaration file for module #66 - GitHub
Bug report I am importing a specific file from a library on npm, e.g. import file1 from 'someLib/src/file1'. To get its types to...
Read more >Could not find declaration file for module 'X' Error | bobbyhadz
The error "Could not find declaration file for module" occurs when TypeScript cannot find the type declaration for a module.
Read more >Open Q&A - Algolia Community
js, VS Code is giving me this message: Could not find a declaration file for module 'instantsearch.js/es/widgets'. '/Users/NAME/Documents/Web/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi I am getting the same issue, I am using the Expo Bare workflow.
I am not a Typescript expert, but I think it may be because the
index.d.ts
file is in thesrc
folder but when you import the library it looks insidelib/commonjs
?Thank you for your work!
you can try
rm -rf node_modules && yarn && cd ./ios && pod install && cd ..