Skip to content

1.0.0-alpha: error upon save file: Error detected while processing function... #230

Open

Description

@city41

Do you want to request a feature or report a bug?
bug

What is the current/expected behavior?
Upon saving a file, expecting it to format the code. But instead getting

Error detected while processing function prettier#Prettier[33]..prettier#job#runner#run[2]..<SNR>86_asyncFormat[14]..prettier#job#async#ne
ovim#run:
line   23:

What version of vim-prettier are you using - (output of :PrettierVersion) ?
1.0.0-alpha

What version of prettier are you using - (output of :PrettierCliVersion) ?
1.19.1

What is your prettier executable path - (output of :PrettierCliPath) ?
/home/matt/dev/jumpclub/node_modules/.bin/prettier

(ie, the local prettier inside my project)

Did this work in previous versions of vim-prettier and/or prettier ?

I think so. I am setting up a new machine and I believe when I installed my vim plugins it picked up a newer version of vim-prettier. But I am not totally sure.

Other info
vim version: NVIM v0.4.0-1655-gc190415dc
OS: Ubuntu 18.04

I installed the 0.x release and do not get the error. The 0.x version seems to be behaving as expected.

and btw, thanks for making this plugin, super useful!

Activity

  1. mitermayer commented on Feb 28, 2020

    @mitermayer
    Member

    Thank you for reporting this! Will try checking with this new release of NVIM as it may be an incompatibility. Will aim to send a fix in the next couple days If i can repro it locally

  2. mitermayer commented on Mar 21, 2020

    @mitermayer
    Member

    Hi @city41,

    I have just submitted some fixes for Neovim on f10100e,

    Do you mind trying to see if you still have the same issues ?

  3. mitermayer commented on Mar 22, 2020

    @mitermayer
    Member

    This issue has been fixed

  4. city41 commented on Mar 22, 2020

    @city41
    Author

    I think I still have the problem. When I save a file I get

    Error detected while processing function prettier#Prettier[33]..prettier#job#runner#run[2]..<SNR>85_asyncFormat[14]..prettier#job#async#ne ovim#run:

    I went into my plugged directory and confirmed I have the latest vim-prettier. I did that by looking at the file autoload/prettier/job/async/neovim.vim and confirming it has the added redraw! on line 63.

  5. mitermayer commented on Mar 25, 2020

    @mitermayer
    Member

    Hi @city41

    Will reopen this issue and look into it again

  6. marcelmanz commented on Jan 16, 2021

    @marcelmanz

    I have the same problem here.

  7. johnpangalos commented on Jun 8, 2021

    @johnpangalos

    I have this problem as well though my work around is this:

    autocmd BufWritePre *.md,*.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.vue,*.yaml,*.html silent! PrettierAsync

    Not the nicest thing, but it stops this error.

  8. sahilrajput03 commented on Mar 11, 2022

    @sahilrajput03

    FYI: I also encountered same problem but I noticed that this happens only if you have

    set shell=/bin/bash\ -i
    " This usually helps in allowing usage of aliases and funcions from .bashrc file.
    

    in your ~/nvim/init.vim (~/.vimrc) file.

    By removing that the issue got resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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