Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp files triggers error in watch tasks #45

Open
AndyOGo opened this issue Aug 24, 2016 · 13 comments
Open

Temp files triggers error in watch tasks #45

AndyOGo opened this issue Aug 24, 2016 · 13 comments

Comments

@AndyOGo
Copy link

AndyOGo commented Aug 24, 2016

Versions

scss-lint version: I can't tell, cause it seems to be bundled with PHPStorm

OS: Mac OS X El Capitan 10.11.6
IDEA product and version: PHPStorm 2016.2

Description

SCSS-lint tries to lint JS files.

Error: ENOENT: no such file or directory, open '/Users/andy/dev/style-guide/jquery/register-plugin_scsslint_tmp802830433474418013.js'
at Error (native)

There seems to be an related issue, but it does not seem to be resolved:
#13

Steps to Reproduce

  1. Setup Gulp watch for JavaScript bundling, minification, etc.
  2. Edit JS files in PHPStorm
  3. SCSS-Lint generates temporary files for JS and immediatly removes them
  4. This triggers gulp watch
  5. Gulp watch dies because he can't find the file again.

Expected behavior:

  • SCSS-lint should never lint javascript files
  • SCSS-lint should never create temporary files inside source folders

Actual behavior:

  • SCSS-lint lints javascript files
  • SCSS-lint creates temporary files inside source folders
@AndyOGo
Copy link
Author

AndyOGo commented Aug 30, 2016

@idok
Any updates on this?

@AndyOGo
Copy link
Author

AndyOGo commented Sep 16, 2016

@idok
Did you have any chance to look into this.
It seems to be really weird for two reasons:

  • it lints .js files with scsslint...
  • tmp files are stored inside source folders, imho they should be in a seperate tmp/ dir

tasks/docs-scripts_scsslint_tmp1537225672253761620.js
tasks/scripts-bundle_scsslint_tmp4377624646903046346.js

I tried with other IDE's and only InteliJ based IDE suffer from this illness

@AndyOGo
Copy link
Author

AndyOGo commented Sep 16, 2016

I quickly searched your repo for scsslint and the following two hints came up:

private static final String SCSS_LINT_TMP = "_scsslint_tmp";

private static final String SCSS_LINT_TMP = "_scsslint_tmp";

And the file creation here:

// try to create a temp file next to original file
retFile = File.createTempFile(this.baseName + SCSS_LINT_TMP, this.extension, new File(originalFile.getParent().getPath()));

// try to create a temp file next to original file
retFile = File.createTempFile(this.baseName + SCSS_LINT_TMP, this.extension, new File(originalFile.getParent().getPath()));

@jillesme
Copy link

I have this issue, too

@laurenbrandstein
Copy link

laurenbrandstein commented Jun 3, 2017

Me too. Or me three. Or four. This breaks the watch and requires rerunning gulp. Inconvenient. Any help would be appreciated!

For now trying trying to mitigate by adding '!**/*scsslint*js' to gulp watch to ignore those temp files.

@aspirinchaos
Copy link

@AndyOGo
have you found how to disable this plugin?

@AndyOGo
Copy link
Author

AndyOGo commented Aug 23, 2017

@aspirinchaos
Unfortunately no, I still don't know how to disable this 😞
Though I can confirm that in case of Gulp this issue can be workarounded by adding GLOB exclusion '!**/*scsslint*js' as asuggested already by @laurenbrandstein

Anyway I switched to webpack and didn't experience this bug there...

@AndyOGo
Copy link
Author

AndyOGo commented Aug 23, 2017

I have created an Issue now directly at JetBrains
https://youtrack.jetbrains.com/issue/WI-37757

@idok
Copy link
Owner

idok commented Aug 27, 2017

Hi Andy,
Do you have any other plugins installed?

@AndyOGo
Copy link
Author

AndyOGo commented Aug 29, 2017

Hi @idok
No, nothing related to SCSS.

Btw. I already found the bug here:

I quickly searched your repo for scsslint and the following two hints came up:

private static final String SCSS_LINT_TMP = "_scsslint_tmp";

private static final String SCSS_LINT_TMP = "_scsslint_tmp";

And the file creation here:

// try to create a temp file next to original file
retFile = File.createTempFile(this.baseName + SCSS_LINT_TMP, this.extension, new File(originalFile.getParent().getPath()));

// try to create a temp file next to original file
retFile = File.createTempFile(this.baseName + SCSS_LINT_TMP, this.extension, new File(originalFile.getParent().getPath()));

Obviously this code seems to run for any extension (File.createTempFile(this.baseName + SCSS_LINT_TMP, this.extension,), though it should only run for .scss or .sass files.

@idok
Copy link
Owner

idok commented Aug 31, 2017

SCSS Lint plugin should and as far as I know only lints scss files.
Do you have eslint plugin installed?
If you uninstall SCSS Lint plugin do you still see temp js files?

@AndyOGo
Copy link
Author

AndyOGo commented Aug 31, 2017

@idok
Sure I use ESLint, but installed as node package.
Unfortunately I reported this issue about a year ago, meanwhile I changed my stack a lot.
to wepback, stylelint, ... so I can't supply you with any actual logs... sorry

@softmantk
Copy link

This issue still exist! My dev runner nodemon is restarting and throwing errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants