Giter VIP home page Giter VIP logo

Comments (5)

cyrus-and avatar cyrus-and commented on May 18, 2024

Which version of Node.js are you using? You can find it out by running node --version.

Also try to run the following in your environment:

$ node -p 'new Promise((f, r) => f(42))'
Promise { 42 }

from chrome-remote-interface.

klodoma avatar klodoma commented on May 18, 2024

node version: v0.10.25

root@9886acca1338:/producer# node --version
v0.10.25

Now, I've migrated the docker container to Ubuntu 16.04 and it seems to have fixed the problem.
I'll dig further to gather a bit more info.
It seems that
npm install es6-promise and putting this in the js also might work
var Promise = require("es6-promise").Promise

from chrome-remote-interface.

cyrus-and avatar cyrus-and commented on May 18, 2024

Yup, that's the problem, native ES6 promises are not present in v0.10.25. IMHO updating to a more recent version of Node.js is better than using a polyfill.

I should probably state the minimum required Node.js version in package.json.

from chrome-remote-interface.

klodoma avatar klodoma commented on May 18, 2024

Thanks for the time and replies. I thought this is not a bug from your code, just I didn't know where to go :)
I'll close this.

from chrome-remote-interface.

cyrus-and avatar cyrus-and commented on May 18, 2024

You're welcome!
I've added the check in the package.json, you should now get a warning if you use a version older than 0.12.15.

from chrome-remote-interface.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.