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

Cannot run program "sass": error=2, No such file or directory #6

Closed
strelec opened this issue Jul 15, 2014 · 5 comments
Closed

Cannot run program "sass": error=2, No such file or directory #6

strelec opened this issue Jul 15, 2014 · 5 comments

Comments

@strelec
Copy link

strelec commented Jul 15, 2014

First of all, I have sass installed:

[rok@rok-laptop ~]$ sass -v
Sass 3.3.9 (Maptastic Maple)

But nonetheless, I get this error. Here is the complete stacktrace:

java.io.IOException: Cannot run program "sass": error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
    at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:68)
    at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:99)
    at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:98)
    at sass.SassCompiler$.runCompiler(SassCompiler.scala:54)
    at sass.SassCompiler$.compile(SassCompiler.scala:22)
    at sass.SbtSass$$anonfun$5$$anonfun$6$$anonfun$7.apply(SbtSass.scala:47)
    at sass.SbtSass$$anonfun$5$$anonfun$6$$anonfun$7.apply(SbtSass.scala:42)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at sass.SbtSass$$anonfun$5$$anonfun$6.apply(SbtSass.scala:41)
    at sass.SbtSass$$anonfun$5$$anonfun$6.apply(SbtSass.scala:39)
    at com.typesafe.sbt.web.incremental.package$.syncIncremental(package.scala:228)
    at sass.SbtSass$$anonfun$5.apply(SbtSass.scala:38)
    at sass.SbtSass$$anonfun$5.apply(SbtSass.scala:32)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)

Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:187)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
    at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:68)
    at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:99)
    at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:98)
    at sass.SassCompiler$.runCompiler(SassCompiler.scala:54)
    at sass.SassCompiler$.compile(SassCompiler.scala:22)
    at sass.SbtSass$$anonfun$5$$anonfun$6$$anonfun$7.apply(SbtSass.scala:47)
    at sass.SbtSass$$anonfun$5$$anonfun$6$$anonfun$7.apply(SbtSass.scala:42)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at sass.SbtSass$$anonfun$5$$anonfun$6.apply(SbtSass.scala:41)
    at sass.SbtSass$$anonfun$5$$anonfun$6.apply(SbtSass.scala:39)
    at com.typesafe.sbt.web.incremental.package$.syncIncremental(package.scala:228)
    at sass.SbtSass$$anonfun$5.apply(SbtSass.scala:38)
    at sass.SbtSass$$anonfun$5.apply(SbtSass.scala:32)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)
[error] (web-assets:sass) java.io.IOException: Cannot run program "sass": error=2, No such file or directory
@ShaggyYeti
Copy link
Owner

Hello.

I attempted to fix this error in new 0.1.4 version. New version uploaded in ivy-repository.
Change version of sbt-sass from 0.1.3 to 0.1.4 in project/plugins.sbt and try to run your project. Does it work?

@strelec
Copy link
Author

strelec commented Jul 17, 2014

I get this error now.

However, this bug (#6) only occurs when I use intelliJ Run (incremental compiler), activator ~run works fine.

So, I guess it might be their failure.

java.lang.Exception: 'sass' command not found. Try to add path to 'sass' to your $PATH system variable
    at sass.SassCompiler$.getSassPathInLinux(SassCompiler.scala:51)
    at sass.SassCompiler$.sassCommand(SassCompiler.scala:55)
    at sass.SassCompiler$.compile(SassCompiler.scala:24)
    at sass.SbtSass$$anonfun$5$$anonfun$6$$anonfun$7.apply(SbtSass.scala:47)
    at sass.SbtSass$$anonfun$5$$anonfun$6$$anonfun$7.apply(SbtSass.scala:42)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at sass.SbtSass$$anonfun$5$$anonfun$6.apply(SbtSass.scala:41)
    at sass.SbtSass$$anonfun$5$$anonfun$6.apply(SbtSass.scala:39)
    at com.typesafe.sbt.web.incremental.package$.syncIncremental(package.scala:228)
    at sass.SbtSass$$anonfun$5.apply(SbtSass.scala:38)
    at sass.SbtSass$$anonfun$5.apply(SbtSass.scala:32)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)

@ShaggyYeti
Copy link
Owner

Yes. The reason maybe that your IDE doesn't read linux environment variables. You can add path to directory where is placed sass to PATH environment variable in Intellij IDEA. Example here: http://flummox-engineering.blogspot.ru/2013/09/how-to-append-environment-variable-path.html

@strelec
Copy link
Author

strelec commented Jul 19, 2014

Thanks.

Maybe we should put a remark about this to the README. Or not, anyone searching for error will get this thread anyway.

@strelec strelec closed this as completed Jul 19, 2014
@ShaggyYeti
Copy link
Owner

Good idea. Done ;-)

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

2 participants