saurabhgupta050890 / transaction-sms-parser

Library to parse transactional SMS texts. Give structured information about transaction from the SMS notifications received when transacting from banks, cards, wallets etc.
MIT License
29 stars 9 forks source link

Import failures in react native #17

Closed maniac-tech closed 1 month ago

maniac-tech commented 1 month ago

Unable to resolve "transaction-sms-parser" from "components/x/y.js"

maniac-tech commented 1 month ago

This seems to be related to the missing index.js at the root in the typescript package 🤔

saurabhgupta050890 commented 1 month ago

Have not used with react native but have been using with in other FE projects. Don't think this should be an issue. Try clearing npm cache and removing node_modules.

maniac-tech commented 1 month ago

Have not used with react native but have been using with in other FE projects. Don't think this should be an issue. Try clearing npm cache and removing node_modules.

I figured the issue. It is the lack of index.js, I was able to bypass this issue by tweaking the import as below:

import { getTransactionInfo } from 'transaction-sms-parser/dist/lib';