Closed
Description
Pre-Checks
- Follow our Code of Conduct.
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Faker issue and not related to a combination with another package.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
- I am willing to provide a PR.
Describe the bug
Hello, I'm trying to use Faker extension and when I run the test, I get the error message on the console:
ReferenceError: Intl is not defined
at ./node_modules/@faker-js/faker/dist/esm/chunk-2JBE4HP3.mjs (webpack://***/./node_modules/@faker-js/faker/dist/esm/chunk-2JBE4HP3.mjs:4:25475(2732))
at call (native)
at __webpack_require__ (webpack://***/webpack/bootstrap:19:0(33))
at ./node_modules/@faker-js/faker/dist/esm/chunk-BFO2MQ2Q.mjs (webpack://***/./node_modules/@faker-js/faker/dist/esm/chunk-BAJCEGMK.mjs:1:43764(24))
at call (native)
at __webpack_require__ (webpack://***/webpack/bootstrap:19:0(33))
at ./node_modules/@faker-js/faker/dist/esm/index.mjs (webpack://***/./node_modules/@faker-js/faker/dist/esm/chunk-ZVFD5DJO.mjs:1:7399(291))
at call (native)
at __webpack_require__ (webpack://***/webpack/bootstrap:19:0(33))
at ./src/actions/requests/requests.Employee.ts (webpack://***/./src/actions/index.ts:11:69(67))
at call (native)
at __webpack_require__ (webpack://***/webpack/bootstrap:19:0(33))
at webpack://***/webpack/runtime/node%20module%20decorator:5:0(36)
at file://***/dist/***.bundle.js:23809:3(477)
Minimal reproduction code
No response
Additional Context
package.json devDependencies:
"devDependencies": {
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.4",
"@babel/node": "^7.20.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/preset-env": "^7.21.4",
"@babel/preset-typescript": "^7.21.4",
"@faker-js/faker": "^8.0.2",
"@types/mocha": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"babel-eslint": "^10.1.0",
"babel-loader": "^9.1.2",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard-with-typescript": "^34.0.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"prettier": "2.8.7",
"typescript": "^5.0.4",
"webpack": "^5.78.0",
"webpack-cli": "^5.0.1"
}
import:
import { faker } from '@faker-js/faker';
Environment Info
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
Memory: 2.31 GB / 15.73 GB
Binaries:
Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.51)
Internet Explorer: 11.0.19041.1566
npmPackages:
@faker-js/faker: ^8.0.2 => 8.0.2
Which module system do you use?
- CJS
- ESM
Used Package Manager
npm