mihai-vlc / sublime-jsfmt

jsfmt plugin for Sublime Text
MIT License
477 stars 21 forks source link

ReferenceError: Promise is not defined #31

Closed Shaked closed 9 years ago

Shaked commented 9 years ago

Hey, I am trying to use the formatter, it worked perfectly until few days ago and suddenly I have started to see this error:

JSFMT ==>
Error: 
/Users/Shaked/Library/Application Support/Sublime Text 3/Packages/jsfmt/node_modules/get-stdin/index.js:7
    return new Promise(function (resolve) {
               ^
ReferenceError: Promise is not defined
    at module.exports (/Users/Shaked/Library/Application Support/Sublime Text 3/Packages/jsfmt/node_modules/get-stdin/index.js:7:13)
    at Object.<anonymous> (/Users/Shaked/Library/Application Support/Sublime Text 3/Packages/jsfmt/jsfmt.js:7:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

I am on a Mac, Sublime Text 3.

Thank you, Shaked

mihai-vlc commented 9 years ago

What is your version of nodejs ?

Shaked commented 9 years ago

Sorry, forgot adding it: v0.10.32

mihai-vlc commented 9 years ago

yes, so in the last build I have upgraded all the packages and some of them only work with the node >=0.12.0

since lots of people have this issue I will downgrade some of the packages so they work on 0.10+.

I will do the next release later tonight and after the next update it should work.

Shaked commented 9 years ago

Great. I have upgraded Node to 4.0.0 and it seems to work.

Thank you!

mihai-vlc commented 9 years ago

Closing this issue !