Skip to content

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

@motin

Description

@motin

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 |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions