question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not find a declaration file for module '@baronha/react-native-multiple-image-picker'.

See original GitHub issue

IDE: VScode

Language: Typescript

Workflow: Expo (SDK 41)

How it occurred:

  1. yarn add @baronha/react-native-multiple-image-picker
  2. write import MultipleImagePicker from "@baronha/react-native-multiple-image-picker"; in my code
  3. 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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
James-Firthcommented, Jul 13, 2021

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 the src folder but when you import the library it looks inside lib/commonjs?

Thank you for your work!

image image

0reactions
baronhacommented, Jul 4, 2021

you can try rm -rf node_modules && yarn && cd ./ios && pod install && cd ..

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found