virchau13 / tree-sitter-astro

Tree-sitter grammar for the Astro web framework
MIT License
98 stars 9 forks source link

No highlights in Windows 10 (Works on Ubuntu WSL). Failed to load parser uv_dlopen: The specified procedure could not be found #12

Closed lianhuilui closed 1 year ago

lianhuilui commented 1 year ago

I am not getting any code highlighting in astro files.

:set filetype shows filetype=astro

:checkhealth shows 5 X's next to both html and astro. But html highlights work

I have the same exact config in Ubuntu (WSL) and everything works there as expected.

I'm getting the error - ERROR: astro(highlights): Failed to load parser: uv_dlopen: The specified procedure could not be found.

:checkhealth

gitsigns: require("gitsigns.health").check()
========================================================================
  - OK: git version 2.40.0.windows.1

man: require("man.health").check()
========================================================================
  - OK: plugin/man.vim not in $VIMRUNTIME
  - OK: autoload/man.vim not in $VIMRUNTIME

mason: require("mason.health").check()
========================================================================
## mason.nvim report
  - OK: neovim version >= 0.7.0
  - WARNING: **Go**: not available
  - WARNING: **cargo**: not available
  - WARNING: **luarocks**: not available
  - WARNING: **Ruby**: not available
  - WARNING: **RubyGem**: not available
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - OK: **npm**: `9.5.1`
  - OK: **node**: `v19.8.1
`
  - OK: **python3**: `Python 3.9.10
`
  - WARNING: **pip3**: not available
  - WARNING: **javac**: not available
  - WARNING: **java**: not available
  - WARNING: **julia**: not available
  - OK: **wget**: `GNU Wget 1.21.3 built on mingw32.
`
  - OK: **curl**: `curl 7.83.1 (Windows) libcurl/7.83.1 Schannel
`
  - WARNING: **gzip**: not available
  - OK: **tar**: `bsdtar 3.5.2 - libarchive 3.5.2 zlib/1.2.5.f-ipp 
`
  - OK: **pwsh**: `7.3.3 Microsoft Windows 10.0.19045 Win32NT
`
  - WARNING: **python**: not available
  - WARNING: **pip**: not available
  - WARNING: **7z**: not available
  - OK: GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: 3/20/2023 4:40:11 AM.

nvim: health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: RelWithDebInfo

## Remote Plugins
  - OK: Up to date

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
  - WARNING: `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
  - OK: `node` found v19.8.1 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `gcc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: gcc.exe (x86_64-posix-seh-rev2, Built by MinGW-W64 project) 12.2.0
  - OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

## OS Info:
{
  machine = "x86_64",
  release = "10.0.19045",
  sysname = "Windows_NT",
  version = "Windows 10 Pro"
}

## Parser/Features         H L F I J
  - astro               x x x x x
  - c                   ✓ ✓ ✓ ✓ ✓
  - css                 ✓ . ✓ ✓ ✓
  - gitignore           ✓ . . . .
  - help                ✓ . . . ✓
  - html                x x x x x
  - javascript          ✓ ✓ ✓ ✓ ✓
  - json                ✓ ✓ ✓ ✓ .
  - lua                 ✓ ✓ ✓ ✓ ✓
  - markdown            ✓ . ✓ . ✓
  - markdown_inline     ✓ . . . ✓
  - query               ✓ ✓ ✓ ✓ ✓
  - tsx                 ✓ ✓ ✓ ✓ ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
  - vim                 ✓ ✓ ✓ . ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang}

## The following errors have been detected:
  - ERROR: astro(highlights): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    astro(highlights) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html_tags\highlights.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\highlights.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\astro\highlights.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: astro(locals): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    astro(locals) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\locals.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\astro\locals.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: astro(folds): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    astro(folds) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\folds.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\astro\folds.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: astro(indents): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    astro(indents) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html_tags\indents.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\indents.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\astro\indents.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: astro(injections): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    astro(injections) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html_tags\injections.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\injections.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\astro\injections.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: html(highlights): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    html(highlights) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html_tags\highlights.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\highlights.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: html(locals): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    html(locals) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\locals.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: html(folds): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    html(folds) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\folds.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: html(indents): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    html(indents) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html_tags\indents.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\indents.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.
  - ERROR: html(injections): Failed to load parser: uv_dlopen: The specified procedure could not be found.

    html(injections) is concatenated from the following files:
    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html_tags\injections.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

    | [ERROR]:"C:\Users\Lian\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\html\injections.scm", failed to load: Failed to load parser: uv_dlopen: The specified procedure could not be found.

provider: health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: win32yank

## Python 3 provider (optional)
  - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
  - WARNING: Could not load Python 3:
    C:\ProgramData\chocolatey\bin\python3.EXE does not have the "neovim" module.
    python3.10 not found in search path or not executable.
    C:\ProgramData\chocolatey\bin\python3.9.EXE does not have the "neovim" module.
    python3.8 not found in search path or not executable.
    python3.7 not found in search path or not executable.
    Checking C:\ProgramData\chocolatey\bin\python.EXE caused an unknown error. (-1073741515, output: ) Report this at https://github.com/neovim/neovim
    - ADVICE:
      - See :help |provider-python| for more information.
      - You may disable this provider (and warning) by adding `let g:loaded_python3_provider = 0` to your init.vim
  - INFO: Executable: Not found

## Python virtualenv
  - OK: no $VIRTUAL_ENV

## Ruby provider (optional)
  - WARNING: `ruby` and `gem` must be in $PATH.
    - ADVICE:
      - Install Ruby and verify that `ruby` and `gem` commands work.

## Node.js provider (optional)
  - INFO: Node.js: v19.8.1
  - WARNING: Missing "neovim" npm (or yarn, pnpm) package.
    - ADVICE:
      - Run in shell: npm install -g neovim
      - Run in shell (if you use yarn): yarn global add neovim
      - Run in shell (if you use pnpm): pnpm install -g neovim
      - You may disable this provider (and warning) by adding `let g:loaded_node_provider = 0` to your init.vim

## Perl provider (optional)
  - WARNING: No usable perl executable found

telescope: require("telescope.health").check()
========================================================================
## Checking for required plugins
  - OK: plenary installed.
  - OK: nvim-treesitter installed.

## Checking external dependencies
  - ERROR: rg: not found. `live-grep` finder will not function without [BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep) installed.
  - WARNING: fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities

## ===== Installed extensions =====

vim.lsp: require("vim.lsp.health").check()
========================================================================
  - INFO: LSP log level : WARN
  - INFO: Log path: C:\Users\Lian\AppData\Local\nvim-data\lsp.log
  - INFO: Log size: 6 KB

vim.treesitter: require("vim.treesitter.health").check()
========================================================================
  - INFO: Runtime ABI version : 14
  - ERROR: Impossible to load parser for astro: Failed to load parser: uv_dlopen: The specified procedure could not be found.

  - OK: Loaded parser for c: ABI version 13
  - OK: Loaded parser for css: ABI version 13
  - OK: Loaded parser for gitignore: ABI version 13
  - OK: Loaded parser for help: ABI version 14
  - ERROR: Impossible to load parser for html: Failed to load parser: uv_dlopen: The specified procedure could not be found.

  - OK: Loaded parser for javascript: ABI version 14
  - OK: Loaded parser for json: ABI version 13
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for markdown: ABI version 13
  - OK: Loaded parser for markdown_inline: ABI version 13
  - OK: Loaded parser for query: ABI version 14
  - OK: Loaded parser for tsx: ABI version 14
  - OK: Loaded parser for typescript: ABI version 14
  - OK: Loaded parser for vim: ABI version 14
  - OK: Loaded parser for c: ABI version 13
  - OK: Loaded parser for help: ABI version 14
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for vim: ABI version 14
virchau13 commented 1 year ago

I don't use Windows, so unfortunately I can't really debug this. Some googling for "uv_dlopen not found treesitter" seems to suggest that it's an issue with either not installing the correct C headers/libraries or an issue with the environment.

Maybe take a look at https://github.com/nvim-treesitter/nvim-treesitter/issues/1985.

I'm sorry I can't help further; any advice I could give would be copied off the internet.

lianhuilui commented 1 year ago

I got it working by installing Visual Studio Build Tools. Then installing the "Desktop development with C++" environment from the installer.

https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support