wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.88k stars 264 forks source link

Packer fails to install packages from Gitlab on Windows #858

Open ashencone opened 2 years ago

ashencone commented 2 years ago

Steps to reproduce

Run :PackerUpdate from nvim.

Actual behaviour

fatal: could not create leading directories of 'C:\Users\******\AppData\Local\nvim-data\site\pack\packer\start\https://gitlab.com/__tpb/monokai-pro.nvim': Invalid argument

Expected behaviour

monokai-pro.nvim installs correctly, like on Linux

pidgeon777 commented 2 years ago

I also confirm this bug:

 ✗ Failed to install https://gitlab.com/yorickpeterse/nvim-window.git
  Errors:
    fatal: could not create leading directories of 'C:\NVIM\data\lunarvim\site\pack\packer\start\https://gitlab.com/yorickpeterse/nvim-window.git': Invalid argument
cutey-none commented 2 years ago

Is there any way to fix this?

Joaq33 commented 2 years ago

Try running in powershell as admin

joaocsf commented 2 years ago

I've recently run into this issue as well. As a workaround, you can specify an alias using the as option.

use {
  'https://gitlab.com/__tpb/monokai-pro.nvim',
  as = 'monokai-pro.nvim'
}