traverse.clearCache is not a function
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
#### Input Code
```js
const foo = "foo";
const bar = `asdf ${foo} asd ${foo}`
```
[Babel REPL link](https://babeljs.io/repl#?babili=true&browsers=&build=&builtIns=false&code_lz=MYewdgzgLgBAZiEMC8MBECRoNwChSSwBGAhgE4owAGJAJiRLTACQDemAvjA0251UA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=false&lineWrap=false&presets=babili&prettier=false&targets=Node-8.7&version=7.0.0-beta.38&envVersion=)
#### Actual Output
```js
traverse.clearCache is not a function. (In 'traverse.clearCache()', 'traverse.clearCache' is undefined)
```
#### Expected Output
```js
const bar = `asdf foo asd foo`
```
#### Details
Noticed this bug when playing around on the repl. Only the `minify` plugin is enabled.
Contributor guide
Research direction
Start with the minimal input in the linked Babel REPL and reproduce the failure with only the minify plugin enabled. Trace where the REPL invokes minification and where traverse.clearCache is called; done means the input transforms to `const bar = \`asdf foo asd foo\`` without the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100