question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@faker-js/faker Webpack Compilation Error (in typescript environment)

See original GitHub issue

Current 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.
스크린샷 2022-05-30 오후 6 58 56

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:closed
  • Created a year ago
  • Reactions:6
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Shinigami92commented, Jun 20, 2022
1reaction
JessicaSachscommented, Jun 18, 2022

This is fixed and merged. Will be deployed on Monday.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found