Closed annewanghy closed 6 years ago
Error: Metadata is required
means that either metadata argument was not passed or it was not a valid metadata.
I guess I should change the error message to be more descriptive.
Debugging, thank you for the quick reply!
Version 1.1.11
has been published with more descriptive error message in case of metadata
argument being of incorrect type.
Had solved this problem by using const metadata = require("../metadata.min.json");
instead of import metadata from "../metadata.min.json";
since test environment is node, so it doesn't support es6.
So, you changed your code and it worked? Can this issue be closed then?
Yes.
Hi, really appreciate your library. I have a little problem in react native.
When I use the custom metadata in my project.
Since I use typescript, so I need to write a
phonenumber.d.ts
file to declare the function(And I have found there is nocustom
folder innode_modules/libphonenumber-js
)And then I use it as frontend validation
the code works well but the test cases give me the error
Each function related to phone validation will be broken due to this error, but I don't know how to fixed it. Can you help me with that? thanks in advance : )