klarna / react-native-klarna-inapp-sdk

Klarna's React Native wrapper for the In-App SDK
Apache License 2.0
22 stars 25 forks source link

Could not find a declaration file for module 'react-native-klarna-inapp-sdk'. #230

Open devapalanisamy opened 11 months ago

devapalanisamy commented 11 months ago

Could not find a declaration file for module 'react-native-klarna-inapp-sdk'. '/Users/deva/Desktop/delete_me/AwesomeApp/node_modules/react-native-klarna-inapp-sdk/src/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/react-native-klarna-inapp-sdk if it exists or add a new declaration (.d.ts) file containing declare module 'react-native-klarna-inapp-sdk';ts(7016)

To Reproduce Steps to reproduce the behavior:

  1. Create new react native project
  2. import KlarnaPaymentView in any View
  3. You will see the above error
devapalanisamy commented 11 months ago

Looks like the issue is wrong path in package.json Should be:

"types": "lib/typescript/src/index.d.ts",

NMGuner commented 10 months ago

Hi @devapalanisamy, we have updated the library with lot of changes including a change to how we build and declare types. Can you please try the latest version and let us know if it resolves this