Skip to content

n [Error]: Calling faker.helpers.arrayElement() without arguments is no longer supported. #2250

Closed Answered by matthewmayer
streetycat asked this question in Q&A
Discussion options

You must be logged in to vote

you generally should use the prebuilt faker instances to access locales, for example:

const {fakerEN_US, fakerZH_CN} = require("@faker-js/faker")
fakerEN_US.internet.email()
fakerZH_CN.internet.email()

This ensures that fallback languages are loaded correctly.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@streetycat
Comment options

Answer selected by streetycat
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants