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

ReferenceError: Promise is not defined #6

Closed
eximius313 opened this issue Jan 16, 2016 · 0 comments
Closed

ReferenceError: Promise is not defined #6

eximius313 opened this issue Jan 16, 2016 · 0 comments

Comments

@eximius313
Copy link

If you are using Debian 7 (Wheezy) you probably have NodeJS in version 0.10.29
Running autoprefixer on this version causes following exception:

[info] CoffeeScript compiling on 1 source(s)
[info] LESS compiling on 4 source(s)
[info]
[info]
[info] Autoprefixing CSS
[error]
[error] /home/user/project/node_modules/postcss/lib/lazy-result.js:157
[error]         this.processing = new Promise(function (resolve, reject) {
[error]                               ^
[error] ReferenceError: Promise is not defined
[error]     at LazyResult.async (/home/user/project/node_modules/postcss/lib/lazy-result.js:157:31)
[error]     at LazyResult.then (/home/user/project/node_modules/postcss/lib/lazy-result.js:79:21)
[error]     at doProcess (/home/user/project/node_modules/postcss-cli/index.js:211:14)
[error]     at iterate (/home/user/project/node_modules/neo-async/lib/async.js:8241:18)
[error]     at done (/home/user/project/node_modules/neo-async/lib/async.js:8278:9)
[error]     at Gatherer.<anonymous> (/home/user/project/node_modules/gather-stream/index.js:41:5)
[error]     at Gatherer.emit (events.js:117:20)
[error]     at finishMaybe (_stream_writable.js:360:12)
[error]     at endWritable (_stream_writable.js:367:3)
[error]     at Gatherer.Writable.end (_stream_writable.js:345:5)
[info]
com.typesafe.sbt.jse.SbtJsTask$JsTaskFailure:
/home/user/project/node_modules/postcss/lib/lazy-result.js:157
        this.processing = new Promise(function (resolve, reject) {
                              ^
ReferenceError: Promise is not defined
    at LazyResult.async (/home/user/project/node_modules/postcss/lib/lazy-result.js:157:31)
    at LazyResult.then (/home/user/project/node_modules/postcss/lib/lazy-result.js:79:21)
    at doProcess (/home/user/project/node_modules/postcss-cli/index.js:211:14)
    at iterate (/home/user/project/node_modules/neo-async/lib/async.js:8241:18)
    at done (/home/user/project/node_modules/neo-async/lib/async.js:8278:9)
    at Gatherer.<anonymous> (/home/user/project/node_modules/gather-stream/index.js:41:5)
    at Gatherer.emit (events.js:117:20)
    at finishMaybe (_stream_writable.js:360:12)
    at endWritable (_stream_writable.js:367:3)
    at Gatherer.Writable.end (_stream_writable.js:345:5)

        at com.typesafe.sbt.jse.SbtJsTask$$anonfun$com$typesafe$sbt$jse$SbtJsTask$$executeJsOnEngine$1.apply(SbtJsTask.scala:195)
        at com.typesafe.sbt.jse.SbtJsTask$$anonfun$com$typesafe$sbt$jse$SbtJsTask$$executeJsOnEngine$1.apply(SbtJsTask.scala:167)
        at scala.util.Success$$anonfun$map$1.apply(Try.scala:206)
        at scala.util.Try$.apply(Try.scala:161)
        at scala.util.Success.map(Try.scala:206)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
        at scala.concurrent.impl.ExecutionContextImpl$$anon$3.exec(ExecutionContextImpl.scala:107)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[error] (web-assets:mappings) com.typesafe.sbt.jse.SbtJsTask$JsTaskFailure:
[error] /home/user/project/node_modules/postcss/lib/lazy-result.js:157
[error]         this.processing = new Promise(function (resolve, reject) {
[error]                               ^
[error] ReferenceError: Promise is not defined
[error]     at LazyResult.async (/home/user/project/node_modules/postcss/lib/lazy-result.js:157:31)
[error]     at LazyResult.then (/home/user/project/node_modules/postcss/lib/lazy-result.js:79:21)
[error]     at doProcess (/home/user/project/node_modules/postcss-cli/index.js:211:14)
[error]     at iterate (/home/user/project/node_modules/neo-async/lib/async.js:8241:18)
[error]     at done (/home/user/project/node_modules/neo-async/lib/async.js:8278:9)
[error]     at Gatherer.<anonymous> (/home/user/project/node_modules/gather-stream/index.js:41:5)
[error]     at Gatherer.emit (events.js:117:20)
[error]     at finishMaybe (_stream_writable.js:360:12)
[error]     at endWritable (_stream_writable.js:367:3)
[error]     at Gatherer.Writable.end (_stream_writable.js:345:5)
[error] application -

! @6on65jnac - Internal server error, for (GET) [/] ->

play.sbt.PlayExceptions$UnexpectedException: Unexpected exception[JsTaskFailure:
/home/user/project/node_modules/postcss/lib/lazy-result.js:157
        this.processing = new Promise(function (resolve, reject) {
                              ^
ReferenceError: Promise is not defined
    at LazyResult.async (/home/user/project/node_modules/postcss/lib/lazy-result.js:157:31)
    at LazyResult.then (/home/user/project/node_modules/postcss/lib/lazy-result.js:79:21)
    at doProcess (/home/user/project/node_modules/postcss-cli/index.js:211:14)
    at iterate (/home/user/project/node_modules/neo-async/lib/async.js:8241:18)
    at done (/home/user/project/node_modules/neo-async/lib/async.js:8278:9)
    at Gatherer.<anonymous> (/home/user/project/node_modules/gather-stream/index.js:41:5)
    at Gatherer.emit (events.js:117:20)
    at finishMaybe (_stream_writable.js:360:12)
    at endWritable (_stream_writable.js:367:3)
    at Gatherer.Writable.end (_stream_writable.js:345:5)
]
        at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:51) ~[na:na]
        at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:44) ~[na:na]
        at scala.Option.map(Option.scala:145) ~[scala-library-2.11.7.jar:na]
        at play.sbt.run.PlayReload$.taskFailureHandler(PlayReload.scala:44) ~[na:na]
        at play.sbt.run.PlayReload$.compileFailure(PlayReload.scala:40) ~[na:na]
        at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17) ~[na:na]
        at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17) ~[na:na]
        at scala.util.Either$LeftProjection.map(Either.scala:377) ~[scala-library-2.11.7.jar:na]
        at play.sbt.run.PlayReload$.compile(PlayReload.scala:17) ~[na:na]
        at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3$$anonfun$2.apply(PlayRun.scala:61) ~[na:na]
Caused by: com.typesafe.sbt.jse.SbtJsTask$JsTaskFailure:
/home/user/project/node_modules/postcss/lib/lazy-result.js:157
        this.processing = new Promise(function (resolve, reject) {
                              ^
ReferenceError: Promise is not defined
    at LazyResult.async (/home/user/project/node_modules/postcss/lib/lazy-result.js:157:31)
    at LazyResult.then (/home/user/project/node_modules/postcss/lib/lazy-result.js:79:21)
    at doProcess (/home/user/project/node_modules/postcss-cli/index.js:211:14)
    at iterate (/home/user/project/node_modules/neo-async/lib/async.js:8241:18)
    at done (/home/user/project/node_modules/neo-async/lib/async.js:8278:9)
   at Gatherer.<anonymous> (/home/user/project/node_modules/gather-stream/index.js:41:5)
   at Gatherer.emit (events.js:117:20)
   at finishMaybe (_stream_writable.js:360:12)
   at endWritable (_stream_writable.js:367:3)
   at Gatherer.Writable.end (_stream_writable.js:345:5)

       at com.typesafe.sbt.jse.SbtJsTask$$anonfun$com$typesafe$sbt$jse$SbtJsTask$$executeJsOnEngine$1.apply(SbtJsTask.scala:195) ~[na:na]
       at com.typesafe.sbt.jse.SbtJsTask$$anonfun$com$typesafe$sbt$jse$SbtJsTask$$executeJsOnEngine$1.apply(SbtJsTask.scala:167) ~[na:na]
       at scala.util.Success$$anonfun$map$1.apply(Try.scala:206) ~[scala-library-2.11.7.jar:na]
       at scala.util.Try$.apply(Try.scala:161) ~[scala-library-2.11.7.jar:na]
       at scala.util.Success.map(Try.scala:206) ~[scala-library-2.11.7.jar:na]
       at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) ~[scala-library-2.11.7.jar:na]
       at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) ~[scala-library-2.11.7.jar:na]
       at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) ~[scala-library-2.11.7.jar:na]
       at scala.concurrent.impl.ExecutionContextImpl$$anon$3.exec(ExecutionContextImpl.scala:107) ~[scala-library-2.11.7.jar:na]
       at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) ~[scala-library-2.11.7.jar:na]

In order to make autoprefixer work, you need to do (as root):

#curl -sL https://deb.nodesource.com/setup_0.12 | bash -
#apt-get install nodejs=0.12.9-1nodesource1~wheezy1

as this post states.
Note that you must specify correct version. Without it the default (old) one will be installed.

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

1 participant