minify icon indicating copy to clipboard operation
minify copied to clipboard

traverse.clearCache is not a function

Open marvinhagemeister opened this issue 6 years ago • 5 comments

Input Code

const foo = "foo";
const bar = `asdf ${foo} asd ${foo}`

Babel REPL link

Actual Output

traverse.clearCache is not a function. (In 'traverse.clearCache()', 'traverse.clearCache' is undefined)

Expected Output

const bar = `asdf foo asd foo`

Details

Noticed this bug when playing around on the repl. Only the minify plugin is enabled.

marvinhagemeister avatar Apr 01 '18 07:04 marvinhagemeister

I'm hitting it as well, it's enough to enable "Minify" on any code to make it break.

An updated REPL link (the one from the OP doesn't work for me): https://babeljs.io/repl#?babili=true&browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=G4QwTgBCELwQTAbgFBA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&sourceType=module&lineWrap=false&presets=babili&prettier=false&targets=&version=7.0.0-alpha.19&envVersion=2.0.0-beta.2

mgol avatar Jun 29 '18 14:06 mgol

I ran into this problem on my project (mozilla/normandy#1510, mentioned above) and was able to fix it by changing from [email protected] to the renamed [email protected]. That doesn't explain the problem with the repl though.

mythmon avatar Aug 29 '18 17:08 mythmon

Also got the same problem.

rhuanbarreto avatar Mar 15 '19 11:03 rhuanbarreto

Also found this while playing around with the online repl. Any updates on this one?

jackyef avatar May 01 '19 10:05 jackyef

I got the same problem here, any update?

gongpeione avatar Nov 25 '19 12:11 gongpeione