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

Unable to run test #3

Open
gnestor opened this issue Nov 18, 2016 · 0 comments
Open

Unable to run test #3

gnestor opened this issue Nov 18, 2016 · 0 comments

Comments

@gnestor
Copy link

gnestor commented Nov 18, 2016

When I run babel-node --presets es2015 transform.js in the /test directory, I get the following:

SyntaxError: unknown: Unexpected token (4:17)
  2 | import fs from "fs-promise"
  3 | 
> 4 | var text = await fs.readFile('README.md', 'utf-8')
    |                  ^
  5 | 
  6 | console.log(text)
    at Parser.pp$5.raise (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:4215:13)
    at Parser.pp.unexpected (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:1599:8)
    at Parser.pp$3.parseAwait (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:4119:10)
    at Parser.pp$3.parseExprAtom (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:3462:23)
    at Parser.pp$3.parseExprSubscripts (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:3305:19)
    at Parser.pp$3.parseMaybeUnary (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:3285:19)
    at Parser.pp$3.parseExprOps (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:3215:19)
    at Parser.pp$3.parseMaybeConditional (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:3192:19)
    at Parser.pp$3.parseMaybeAssign (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:3155:19)
    at Parser.pp$1.parseVar (/Users/grant/Sites/opensource/babel-plugin-top-level-await/node_modules/babel-core/node_modules/babylon/lib/index.js:2177:24)
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