packer.nvim icon indicating copy to clipboard operation
packer.nvim copied to clipboard

Packer fails to install packages from Gitlab on Windows

Open ashencone opened this issue 3 years ago • 4 comments

  • nvim --version: NVIM v0.6.1
  • git --version: git version 2.35.1.windows.2
  • Operating system/version: Windows 11
  • Terminal name/version: Windows Terminal

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

ashencone avatar Mar 17 '22 10:03 ashencone

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

pidgeon777 avatar Apr 01 '22 07:04 pidgeon777

Is there any way to fix this?

cutey-none avatar May 14 '22 11:05 cutey-none

Try running in powershell as admin

Joaq33 avatar May 15 '22 06:05 Joaq33

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'
}

joaocsf avatar Jul 02 '22 09:07 joaocsf