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.

v8-compile-cache is creating a temporary directory and is not being cleaned up after running the eslint command

See original GitHub issue

Tell us about your environment

Environment Info:

Node version: v14.16.1
npm version: v6.14.13
Local ESLint version: Not found
Global ESLint version: v7.24.0 (Currently used)
Operating System: win32 10.0.19042

What parser (default, @babel/eslint-parser, @typescript-eslint/parser, etc.) are you using? None

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

C:\> cd .\temp\
C:\temp> npm install -g eslint
C:\temp> ls #empty directory displays
C:\temp> eslint
C:\temp> ls #new directory "fadsfs" appears
C:\temp> ls .\fadsfs\v8-compile-cache\8.4.371.19-node.18\ #Displays BLOB and MAP files exists

Screenshot of reproduced flow 2021-04-22 17_16_47-C__temp ~ PowerShell 5 1 19041 906 64-bit (2860)

What did you expect to happen? Any temporary directories created to be cleaned out once the eslint command completes

What actually happened? Please include the actual, raw output from ESLint. A temporary directory created by v8-compile-cache remains after the eslint lint command completes (please see above for raw output from eslint)

  • If I comment out this line of code, the issue does not reproduce. Confirming my suspicions that when eslint runs v8-compile-cache, it is creating this directory.
  • Running v8-compile-cache standalone does not reproduce the issue. If I make an index.js file that only has require('v8-compile-cache') for it’s contents and run node index.js , the issue does not reproduce
  • I’ve uninstalled nodejs completely following these steps and then reinstalled nodejs and the issue persists
  • I’ve tried using several different versions of npm and nodejs and the issue persists

Any insight as to what in my environment might be causing eslint to create these folders would be greatly apprecaited. Thank you.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ylembergcommented, Apr 23, 2021

Oh wow, ok so I figured out the issue. In case anyone else has a similar problem I’ll document what fixed it for me here.

I guess what happened is the “TEMP” environment variable got removed somehow (I almost never edit ENV Vars so not sure how this happened). And then when I was running eslint -> which runs v8-compile-cache -> it looked for the env var “TEMP”, but nothing was there so it defaulted to making a new temp directory in my current directory. So I incorrectly assumed this was supposed to be cleaned out, but in reality the directory was just being pointed to my current directory instead of the accurate directory of C:/Users/USERNAME/AppData/Local/Temp.

Closing the issue now. 2021-04-23 11_33_14-Environment Variables

0reactions
nzakascommented, Apr 24, 2021

Thanks for the explanation! Great work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line Interface - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Do not always run eslint from the project's root directory #196
when I open vscode for a web-app via code /path/tp/project/web-app-1 vscode-eslint works as expected. If I open the whole project via code ...
Read more >
eslint | Yarn - Package Manager
An AST-based pattern checker for JavaScript. ast, lint, javascript, ecmascript. readme. npm version Downloads Build Status FOSSA Status
Read more >
ESLint not working in VS Code? - Stack Overflow
I have use the command eslint --init to add the basic .eslintrc.json to the main directory of my package. Other people were able...
Read more >
ESLint not working in VSCode? Help build a troubleshooting ...
Take a look into your eslintrc configuration file and make a list of ... you can stop ESLint from searching further up the...
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