idok / sass-lint-plugin

SASS Lint plugin for Intellij
https://plugins.jetbrains.com/plugin/8171
MIT License
31 stars 5 forks source link

Throwable: Error running Sass Lint inspection: relative file path is null #4

Closed glen-84 closed 6 years ago

glen-84 commented 8 years ago
PhpStorm 2016.1
Build #PS-145.258, built on March 16, 2016
JRE: 1.8.0_60-b27 x86
JVM: Java HotSpot(TM) Server VM by Oracle Corporation

phpstorm-sass-lint-error

Error running Sass Lint inspection: relative file path is null
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:127)
    at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:204)
    at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:48)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.c(ExternalToolPass.java:218)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:44)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:160)
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:333)
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:323)
    at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:267)
    at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:282)
    at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234)
    at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
    at com.intellij.util.Alarm$Request$1.run(Alarm.java:378)
    at com.intellij.util.Alarm$Request.run(Alarm.java:389)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:227)
    at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:187)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
glen-84 commented 8 years ago

@idok Any ideas? This is also happening with PhpStorm 2016.1.1.

Cselt commented 8 years ago

Same issue here, any solution?

tenhobi commented 8 years ago

Same issue.

glen-84 commented 8 years ago

@idok This still isn't fixed. Please re-open.

siiron commented 8 years ago
WebStorm 2016.2.2
Build #WS-162.1628.41, built on August 16, 2016
JRE: 1.8.0_76-release-b216 x86
JVM: OpenJDK Server VM by JetBrains s.r.o

Using sass-lint-plugin v.1.0.3, but get the same error.

tenhobi commented 8 years ago
PhpStorm 2016.2.1
Build #PS-162.1628.23, built on August 10, 2016
JRE: 1.8.0_76-release-b216 x86
JVM: OpenJDK Server VM by JetBrains s.r.o

And I get in Sass Lint plugin 1.9.0 the same error as @glen-84 from April.

Error running Sass Lint inspection: relative file path is null
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:127)
    at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:204)
    at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:48)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.c(ExternalToolPass.java:212)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:44)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:160)
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
    at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:260)
    at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:274)
    at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:229)
    at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:222)
    at com.intellij.util.Alarm$Request$1.run(Alarm.java:378)
    at com.intellij.util.Alarm$Request.run(Alarm.java:389)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:227)
    at com.intellij.util.concurrency.BoundedTaskExecutor.runFirstTaskThenPollAndRunRest(BoundedTaskExecutor.java:178)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$000(BoundedTaskExecutor.java:40)
    at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:197)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
ThiefMaster commented 7 years ago

Same problem in PyCharm.

artemsky commented 7 years ago

same problem in

PhpStorm 2016.2.2
Build #PS-162.2380.11, built on October 24, 2016
JRE: 1.8.0_112-release-287-b3 x86
JVM: OpenJDK Server VM by JetBrains s.r.o
idok commented 7 years ago

I'd love to fix it, but I can't reproduce it. Any help will be appreciated. I've noticed that @glen-84 runs on windows. It this the case with other users as well?

ThiefMaster commented 7 years ago

I'm also on Windows. Code is on a network share, but i guess that doesn't matter.

Cselt commented 7 years ago

I'm also on Windows.

artemsky commented 7 years ago

winver

PhpStorm 2016.3
Build #PS-163.7743.50, built on November 22, 2016
JRE: 1.8.0_112-b15 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
idok commented 7 years ago

please delete .idea/sasslintPlugin.xml file and restart the IDE and report if this still happens.

FedericoBiccheddu commented 7 years ago

Hi @idok,

deleting .idea/sassLintPlugin.xml seems to work, but there is another problem:

03:07   SassLint plugin
        C:\Users\Federico\AppData\Roaming\npm\node_modules\scss-lint\node_modules\node-sass\lib\index.js:22
        throw new Error('`libsass` bindings not found. Try reinstalling `node-sass`?');
        ^
        Error: `libsass` bindings not found. Try reinstalling `node-sass`?
        at getBinding (C:\Users\Federico\AppData\Roaming\npm\node_modules\scss-lint\node_modules\node-sass\lib\index.js:22:11)
        at Object.<anonymous> (C:\Users\Federico\AppData\Roaming\npm\node_modules\scss-lint\node_modules\node-sass\lib\index.js:188:23)
        at Module._compile (module.js:570:32)
        at Object.Module._extensions..js (module.js:579:10)
        at Module.load (module.js:487:32)
        at tryModuleLoad (module.js:446:12)
        at Function.Module._load (module.js:438:3)
        at Module.require (module.js:497:17)
        at require (internal/module.js:20:19)
        at Object.<anonymous> (C:\Users\Federico\AppData\Roaming\npm\node_modules\scss-lint\lib\cli.js:2:12)            

Installing globally or locally the node-sass package does not solve the problem.

Thanks for the support!

glen-84 commented 7 years ago

I renamed .idea/sasslintPlugin.xml, started the IDE, re-entered the configuration, and the old and new config files are still identical. The problem remains.

glen-84 commented 7 years ago

@FedericoBiccheddu This plug-in is for sass-lint, not scss-lint.

FedericoBiccheddu commented 7 years ago

Thank you for the response @glen-84, I didn't notice the difference between plugins because I worked until now with sass plugins and both syntax w/o having any problems.

Installing sass-lint solved my problem but not yours.

Cry0nicS commented 6 years ago

Follow up on this topic: 2 and a half years later, the problem still exists.

Here is a short recording on Sass Lint plugin v. 1.1.1 on PHPStorm 2018.2.2

sasslint

idok commented 6 years ago

@Cry0nicS can you share a screenshot of your sass-lint settings?

Cry0nicS commented 6 years ago

@Cry0nicS can you share a screenshot of your sass-lint settings?

Hi @idok here's the screenshot you requested. I hope it helps. image

idok commented 6 years ago

are there symlinks in your project? can you share a minimal sample project where it reduces?

Cry0nicS commented 6 years ago

are there symlinks in your project? can you share a minimal sample project where it reduces?

@idok no symlinks.

idok commented 6 years ago

ok, I do not really know why but an API call to get the relative file path returns null. I tried to reproduce it but could not. I've uploaded a new version without the relative path code, hopefully it will work, I'm working in the dark here.

idok commented 6 years ago

I'm closing this issue, please check version 1.1.2 and reopen if needed

glen-84 commented 6 years ago

It seems to work now! 🎉

Thank you.