Closed CoderButerbroder closed 8 months ago
@nmamali Please tell me, should I wait for an extraordinary bugfix or solution from you?
@nmamali Please tell me, should I wait for an extraordinary bugfix or solution from you? could you please create a minimal-reproducible-example (https://stackoverflow.com/help/minimal-reproducible-example)
@nmamali Please tell me, should I wait for an extraordinary bugfix or solution from you?
You could perhaps try to set up an Expo Snack. That would help us track down the issue.
@JPStrydom I would love to help you, but I had a snack, I get an error when installing the package:
Failed to resolve dependency 'expo-barcode-generator@2.0.0' (Invalid module ./Background - Module not found: Error: Can't resolve './Background' in '/tmp/snackager/snackager/buildStatus/1/expo-barcode-generator@2.0.0-ios,android,web/package/components')Dependencies
Can you create an expo snack with example code from the documentation and share this snack with me? I would try to reproduce the bug in it
The problem is in the following lines of the files:
1)
file: node_modules/expo-barcode-generator/index.js
line number: 63
fact: blob
is passed in the binary
parameter
2)
file: node_modules/expo-barcode-generator/components/BarcodeChunk.jsx
line number: 4
and 50
The BarcodeChunk
function expects an array of strings, as written in BarcodeChunk.propTypes
on line 50
, but in fact, a blob goes there. This is why this unpleasant warning occurs :)
Maybe I mixed something up, don’t judge strictly. But the problem is precisely in this place!
Yes, I was right about this error.
If you comment out this line (in the screenshot), then the error for which this issue was opened disappears!
file: node_modules/expo-barcode-generator/components/BarcodeChunk.jsx
line number: 50
@JPStrydom @nmamali I hope this helps you resolve the error. I'm really looking forward to the bugfix, thank you. You are very cool developers)
@CoderButerbroder if you change that line to the following, does it still work?
BarcodeChunk.propTypes = {
padding: PropTypes.number,
binary: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.string]),
options: PropTypes.shape({
textPosition: PropTypes.oneOf(['top', 'bottom']),
fontSize: PropTypes.number,
textMargin: PropTypes.number,
width: PropTypes.number,
height: PropTypes.number
})
};
Yes that's right. I replaced this line, and there is no error!
I'll release a new version with that fix shortly. Thanks for testing it 💪
@JPStrydom Will you post a new version with this bugfix on npm?
@CoderButerbroder I've just released 2.0.1. Please let me know if it fixes your issue.
Thank you, I got the new version from npm. Congratulations on your work, it was a pleasure working with you!
Good day, friends. I'm using the example code for using the library from the documentation
and encountering the following error:
I use
Tell me how to fix this?