Closed sbaechler closed 1 month ago
When I use Faker in a Typescript project that has "module" and "moduleResolution" set to "NodeNext", the locale files cannot be resolved.
This only happens if the module resolution is set to NodeNext, but this is the recommended setting going forward.
There is currently a workaround by using a .mjs file for the import of the Faker modules.
No response
System: OS: macOS 14.6.1 CPU: (10) arm64 Apple M1 Max Memory: 5.37 GB / 64.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.4.1 - ~/.nvm/versions/node/v22.4.1/bin/node Yarn: 1.22.22 - ~/.nvm/versions/node/v22.4.1/bin/yarn npm: 10.8.3 - ~/projects/gvz/mock-data/node_modules/.bin/npm pnpm: 8.15.4 - ~/Library/pnpm/pnpm bun: 1.0.29 - ~/.bun/bin/bun Browsers: Brave Browser: 128.1.69.162 Edge: 128.0.2739.67 Safari: 17.6 npmPackages: @faker-js/faker: ^9.0.0 => 9.0.0
npm
are you really sure about this?! 🤪 maybe have another look...
Closing this as duplicate as #3087. If you think this is a mistake, feel free to reopen this issue.
Pre-Checks
Describe the bug
When I use Faker in a Typescript project that has "module" and "moduleResolution" set to "NodeNext", the locale files cannot be resolved.
This only happens if the module resolution is set to NodeNext, but this is the recommended setting going forward.
There is currently a workaround by using a .mjs file for the import of the Faker modules.
Minimal reproduction code
No response
Additional Context
No response
Environment Info
Which module system do you use?
Used Package Manager
npm