Code Monkey home page Code Monkey logo

dockercloud's People

Contributors

gimoh avatar maury91 avatar stanley288 avatar vivanov1410 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

dockercloud's Issues

"ReferenceError: regeneratorRuntime is not defined" when starting a service

I'm getting an error "ReferenceError: regeneratorRuntime is not defined" when trying to start a service, example (in node REPL):

> const DockerCloud = require('dockercloud').default;
> var dc = new DockerCloud('user', 'key');
> dc.services.findByName('MYSERVICE').then(t => { return dc.services.start(t) });
Promise { <pending> }
> _
Promise {
  <rejected> ReferenceError: regeneratorRuntime is not defined
    at /src/node_modules/dockercloud/lib/dockercloud.js:424:39
    at /src/node_modules/dockercloud/lib/dockercloud.js:465:10
    at DockerCloud.startService (/src/node_modules/dockercloud/lib/dockercloud.js:422:14)
    at dc.services.findByName.then.t (repl:1:74)
    at process._tickDomainCallback (internal/process/next_tick.js:129:7) }

Looking around brought me to this answer which suggests adding runtime dependency on babel-polyfill (+ require('babel-polyfill'); into src/dockercloud.js). Tried that and it fixed the issue for me.

I can submit a PR but wanted to check first, I'm not too familiar with the javascript ecosystem yet, and while this works for node environment, I'm not sure if it would also work in browsers, etc. Any thoughts?

SyntaxError: /path/to/dockercloud/test/playground.js: await is a reserved word (3:0)

This happens when trying to follow the instructions in the readme. Installed babel has version 6.22.1

$ yarn install

$ echo "import DockerCloud from '../src/dockercloud'
const dockerCloud = new DockerCloud('username', 'password')
await dockerCloud.connect()
const stack = await dockerCloud.findStackById('stackId')
" > test/playground.js

$ npm run dev

> [email protected] dev /path/to/dockercloud
> babel-node ./test/playground.js --presets=es2015,stage-0

/path/to/dockercloud/node_modules/babel-core/lib/transformation/file/index.js:600
      throw err;
      ^

SyntaxError: /path/to/dockercloud/test/playground.js: await is a reserved word (3:0)
  1 | import DockerCloud from '../src/dockercloud'
  2 | const dockerCloud = new DockerCloud('username', 'password')
> 3 | await dockerCloud.connect()
    | ^
  4 | const stack = await dockerCloud.findStackById('stackId')
  5 |

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.