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

Error on converting #17

Closed
danzen opened this issue Oct 6, 2020 · 2 comments
Closed

Error on converting #17

danzen opened this issue Oct 6, 2020 · 2 comments

Comments

@danzen
Copy link

danzen commented Oct 6, 2020

Hi am getting an error. Any idea? I tried with single quotes around the directory (and with \\ instead of \) and same error. My files are in the posts folder. The arrows are pointing at the async command - there should be a comma after that... I would assume but maybe the error not did put one there?

C:\Users\danzen>medium-2-md convertLocal E:\Downloads\medium-export\posts -dfi
C:\Users\danzen\AppData\Roaming\npm\node_modules\medium-2-md\lib\workflow.js:26
            fs.readdirSync(inputPath).forEach(async file => {
                                              ^^^^^
SyntaxError: missing ) after argument list
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\danzen\AppData\Roaming\npm\node_modules\medium-2-md\index.js:5:18)
@mabhub
Copy link
Contributor

mabhub commented Oct 6, 2020

It seems you are using a node version that does not support async/await

async/await is available in NodeJS since 7.x with startup option, but more completely since 8.x.

Could you check the NodeJS version you are using? (node --version)

@danzen
Copy link
Author

danzen commented Oct 6, 2020

6.10.2 - weird - I just updated in case that was the issue but must have updated npm instead without realizing it! Thanks.

@danzen danzen closed this as completed Oct 6, 2020
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

2 participants