react-native-bluetooth-escpos-printer icon indicating copy to clipboard operation
react-native-bluetooth-escpos-printer copied to clipboard

Could not find a declaration file for module 'react-native-bluetooth-escpos-printer'

Open andresEximia opened this issue 2 years ago • 3 comments

Hello everyone,

I'm developing my first react native app for Android in Visual Studio Code with TypeScript. I followed the installation steps, but when I refer the module in my tsx file I receive the following message:

"Could not find a declaration file for module 'react-native-bluetooth-escpos-printer'. '[PROJECT-NAME]/node_modules/react-native-bluetooth-escpos-printer/index.js' implicitly has an 'any' type."

Thanks in advance!

andresEximia avatar May 18 '22 14:05 andresEximia

I have the same problem, can anyone fix it?

alihirano avatar Jun 08 '22 06:06 alihirano

  1. Create .d.ts file (eg. type.d.ts)
  2. add this line : declare module 'react-native-bluetooth-escpos-printer';

panhavey avatar Jul 29 '22 08:07 panhavey

I think you are using expo app for run the app you can try with android studio because for this package "Native-Modules" Required , if you use the expo it will not recognize so you can try in android studio

Tamilarasan-ThiDiff avatar Apr 28 '23 15:04 Tamilarasan-ThiDiff