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.

Using vue-jest@4.0.1 I am getting the following error when trying to upgrade to jest 27:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: jest@27.0.1
npm ERR! node_modules/jest
npm ERR!   dev jest@"27.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jest@">=26 <27" from ts-jest@26.5.1
npm ERR! node_modules/ts-jest
npm ERR!   peerOptional ts-jest@">= 24 < 27 " from vue-jest@4.0.1
npm ERR!   node_modules/vue-jest
npm ERR!     dev vue-jest@"^4.0.1" from the root project

Node version: v16.2.0 npm version: 7.13.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
Tofandelcommented, May 30, 2021

Be aware that vue-jest doesn’t work with babel-jest version 27, but does work fine with jest version 27

TypeError: babelJest.getCacheKey is not a function

So you can still force the use of jest v27 just don’t try to use babel-jest v27

3reactions
jousi592commented, Jul 13, 2021

Be aware that vue-jest doesn’t work with babel-jest version 27, but does work fine with jest version 27

TypeError: babelJest.getCacheKey is not a function

So you can still force the use of jest v27 just don’t try to use babel-jest v27

So how do I transpile "^.+\\.[t|j]sx?$" files in Jest test files? If I omit the "^.+\\.[t|j]sx?$": "babel-jest" line from my Jest config, I get:

SyntaxError: Cannot use import statement outside a module

Any solution for that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest 27: New Defaults for Jest, 2021 edition
We dropped support for Node 13—but Jest always supports the Current and all LTS Node versions, and Jest 27 continues to support Node...
Read more >
Support Jest 27 · Issue #5771 · nrwl/nx - GitHub
Description. Jest 27 has just released and it only supports Node.js LTS and v15. https://jestjs.io/blog/2021/05/25/jest-27
Read more >
Stencil: Jest 27 Upgrade Instructions - Ionic Blog
Stencil v2.13.0 includes support for Jest v27, but does not require any project to upgrade their version of Jest at this time. You...
Read more >
jest - npm
Delightful JavaScript Testing.. Latest version: 29.3.1, last published: 2 months ago. Start using jest in your project by running `npm i ...
Read more >
Jest 27 changes the default test environment - Release Radar
Developer Ready: A comprehensive JavaScript testing solution. Works out of the box for most JavaScript projects. Instant Feedback: Fast ......
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