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

Failed to parse buffer import.meta.url #188

Closed
radical-edo opened this issue May 16, 2019 · 2 comments
Closed

Failed to parse buffer import.meta.url #188

radical-edo opened this issue May 16, 2019 · 2 comments

Comments

@radical-edo
Copy link

Do you want to request a feature or report a bug?
Bug
What is the current/expected behavior?
Current:
Getting error "Prettier: faliled to parse buffer." when I'm in .mjs file and using import.meta.url to get the __dirname equivalent for ESM modules in Node.js

Expected:
No error

What version of vim-prettier are you using - (output of :PrettierVersion) ?
0.2.7
What version of prettier are you using - (output of :PrettierCliVersion) ?
1.17.0
What is your prettier executable path - (output of :PrettierCliPath) ?
prettier

Did this work in previous versions of vim-prettier and/or prettier ?
Works in Prettier I've checked on prettier playground

No idea about the previous version, though

@mitermayer
Copy link
Member

mitermayer commented Aug 27, 2019

Do you mind testing to see if this issue still occurs on the release/1.x branch ? I will be doing a release soon and promoting it in favor of the legacy version.

To start using that release branch for now you can update your vimrc to point to it like:

Plug 'prettier/vim-prettier', {
  \ 'do': 'yarn install',
  \ 'branch': 'release/1.x'
}

@mitermayer
Copy link
Member

I no longer can reproduce this issue, feel free to reopen if this still happens

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