@faker-js/faker Webpack Compilation Error (in typescript environment)
See original GitHub issueCurrent behavior
Hi, I’m trying using @faker-js/faker in my cypress test.
During running test, Webpack Compilation Error occured where I try
import { faker } from "@faker-js/faker"
error looks like below.
I tried create .babelrc fiiled with {}
below cypress/
, but didn’t work.
dependencies version:
"@faker-js/faker": "^7.1.0",
"typescript": "^4.7.2"
my tsconfig.json
{
"compilerOptions": {
"target": "es2020",
"lib": ["es2020", "dom"],
"types": ["cypress"],
"esModuleInterop": true,
"moduleResolution": "Node"
},
"include": ["**/*.ts"]
}
Desired behavior
test should work properly
Test code to reproduce
Cypress Version
9.5.0
Other
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Webpack Compilation Error with Typescript and JSForce
I am using JSForce with Typescript with CypressIO however each time i attempt to run my code i receive the following: Error: Webpack...
Read more >TypeScript - webpack
In this guide we will learn how to integrate TypeScript with webpack. Basic Setup. First install the TypeScript compiler and loader by running:...
Read more >Getting Started - Faker.js
This documentation only covers the JavaScript implementation of Faker. Environments #. You can run Faker in the Browser, within Node, or the many...
Read more >typescript.md - Webpacker Docs
The default installation only transpiles your TypeScript code using Babel. If you would like to enable type checking as part of the Webpack...
Read more >How I solved and debugged my Webpack issue through trial ...
In order to make it easier to track down errors and warnings, JavaScript offers source maps, which maps your compiled code back to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dante01yoon @ZachJW34
Please checkout the newest version of Faker https://github.com/faker-js/faker/releases/tag/v7.3.0
This is fixed and merged. Will be deployed on Monday.