backpack icon indicating copy to clipboard operation
backpack copied to clipboard

Jest example not working

Open elreeda opened this issue 6 years ago • 3 comments

Hello I tried running the jest example and got

Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.

am I missing something?

elreeda avatar Dec 13 '18 16:12 elreeda

@elreeda, add the following to your package.json. I do not believe this is a permanent fix, but it gets the example working.

  "resolutions": {
    "babel-core": "7.0.0-bridge.0"
  }

joserocha3 avatar Dec 24 '18 21:12 joserocha3

The problem is due to a dependency missing with babel-jest as indicated on yarn install.

In the documentation it asks you to install like this to support Babel 7:

yarn add --dev babel-jest 'babel-core@^7.0.0-0' @babel/core

tutts avatar Jan 01 '19 19:01 tutts

@tutts, right on. Looks like there is a branch with the correct dependencies.

joserocha3 avatar Jan 01 '19 21:01 joserocha3