Babel: beta48 regression

Created on 25 May 2018  路  3Comments  路  Source: babel/babel

In running an AVA test I've started seeing this error with beta48 _(was not in previous)_.

You gave us a visitor for the node type PrivateName but it's not a valid type

  Error: [BABEL] /home/travis/build/standard-things/esm/test/fixture/scenario/ava/test.js: You gave us a visitor for the node type PrivateName but it's not a valid type
      at verify (/home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/traverse/lib/visitors.js:163:13)
      at Function.explode (/home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/traverse/lib/visitors.js:64:3)
      at /home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/core/lib/config/full.js:219:42
      at cachedFunction (/home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/core/lib/config/caching.js:42:17)
      at loadPluginDescriptor (/home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/core/lib/config/full.js:207:10)
      at /home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/core/lib/config/full.js:64:16
      at Array.map (native)
      at recurseDescriptors (/home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/core/lib/config/full.js:63:36)
      at loadFullConfig (/home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/core/lib/config/full.js:112:6)
      at transformSync (/home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/core/lib/transform-sync.js:15:36)
      at Object.transform (/home/travis/build/standard-things/esm/node_modules/ava/node_modules/@babel/core/lib/transform.js:22:65)
      at CachingPrecompiler._transform (/home/travis/build/standard-things/esm/node_modules/ava/lib/caching-precompiler.js:57:24)
      at transform (/home/travis/build/standard-things/esm/node_modules/caching-transform/index.js:43:10)
      at CachingPrecompiler.transform (/home/travis/build/standard-things/esm/node_modules/caching-transform/index.js:60:17)
      at CachingPrecompiler.precompileFile (/home/travis/build/standard-things/esm/node_modules/ava/lib/caching-precompiler.js:36:9)
      at map.files.concat.reduce.err (/home/travis/build/standard-things/esm/node_modules/ava/api.js:134:51)
outdated

Most helpful comment

Are you potentially using a transform that is newer than the version of @babel/core that AVA uses? That would explain the issue. If the versions don't match up there is always the chance of breakage while things are still beta.

All 3 comments

Are you potentially using a transform that is newer than the version of @babel/core that AVA uses? That would explain the issue. If the versions don't match up there is always the chance of breakage while things are still beta.

Ah thanks for the pointer. It looks like ava is locked in to beta.44 which I'm guessing is causing the problem.

Yeah, we've been trying to encourage projects to use peerDependencies on @babel/core so the user has control of the Babel version and to reduce the chances of this happening, but not everyone wants to go that route since it is definitely extra work and more complicated. Once we're stable this is also less common since they'll probably just depend on 7.x and it'll autoupdate.

Was this page helpful?
0 / 5 - 0 ratings