question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Library manager fails to install libraries from git URLs in certain environments

See original GitHub issue

What kind of issue is this? Bug in PlatformIO Core

Configuration

Operating system: Windows 10 Home

PlatformIO Version (platformio --version): 5.0.1

Description of problem

It seems that in certain environments (such as mine) the library manager fails to install libraries from git URLs. For example, the project I am trying to run has added https://github.com/earlephilhower/ESP8266Audio#22b52e0ed5aa86a5e5704c5c86d435c8e3e233a0 under lib_deps, and now I get an error when installing libraries for the project. I assume that this normally works, since it was committed upstream, and comes with changes in the project that use that library, so it must have been working for them. See “The contents of platformio.ini” below.

Steps to Reproduce

  1. Use a system with Windows 10 Home. Having cygwin installed may also be necessary.
  2. Create a folder and in it create a platformio.ini file with the contents from below (“The contents of platformio.ini”).
  3. In that folder, run pio lib install (in PowerShell or cmd.exe, doesn’t matter which)

Actual Results

Once it gets to installing (or trying to install) the library with the git URL, we see these error messages:

Library Manager: Installing git+https://github.com/earlephilhower/ESP8266Audio#22b52e0ed5aa86a5e5704c5c86d435c8e3e233a0
git version 2.17.0
Cloning into 'C:\Users\Matt\.platformio\.cache\tmp\pkg-installing-zahhj8v6'...
fatal: Invalid path '/cygdrive/c/Users/Matt/.platformio/.cache/tmp/pkg-installing-zahhj8v6/C:\Users\Matt\.platformio\.cache\tmp\pkg-installing-zahhj8v6': No such file or directory
Error: VCS: Could not process command ['git', 'clone', '--recursive', 'https://github.com/earlephilhower/ESP8266Audio', 'C:\\Users\\Matt\\.platformio\\.cache\\tmp\\pkg-installing-zahhj8v6']

And the command exits with a non-zero exit code.

Expected Results

I expect it to successfully install the library specified with a git URL.

If problems with PlatformIO Build System:

The content of platformio.ini:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:ttgo-t-watch]
platform = espressif32
board = ttgo-t-watch
framework = arduino
lib_archive = true
board_build.f_flash = 80000000L
board_build.flash_mode = qio
board_build.embed_txtfiles = 
	src/gui/mainbar/setup_tile/time_settings/timezones.json
monitor_speed = 115200
monitor_filters = 
	default
	esp32_exception_decoder
build_flags = 
	-DCORE_DEBUG_LEVEL=3
	-mfix-esp32-psram-cache-issue
src_filter = 
	+<*>
lib_deps = 
	TTGO TWatch Library@=1.3.0
	ESP Async WebServer@>=1.2.0
	AsyncTCP@>=1.1.1
	ArduinoJson@>=6.15.2
	gianbacchio/ESP8266Spiram@^1.0
	luc-github/ESP32SSDP@>=1.1.1
	IRremoteESP8266@>=2.7.10
	PubSubClient@>=2.8
	https://github.com/earlephilhower/ESP8266Audio#22b52e0ed5aa86a5e5704c5c86d435c8e3e233a0
	earlephilhower/ESP8266SAM@^1.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ivankravetscommented, Oct 23, 2020

Happy coding with PlatformIO!

1reaction
ivankravetscommented, Oct 20, 2020
  1. We don’t support cygwin
  2. Could you try the latest pio upgrade --dev?
Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing Packages - Python Packaging User Guide - Python.org
Installing Packages ¶. This section covers the basics of how to install Python packages. It's important to note that the term “package” in...
Read more >
How do I install libraries in my Amazon MWAA environment?
After adding the packages to the repository, use the URL of the repository to import these packages. To import private libraries, specify the ......
Read more >
How to install an npm package from GitHub directly
As of September 2016, installing from vanilla HTTPS GitHub URLs now works: npm install https://github.com/fergiemcdowall/search-index.git.
Read more >
Installing from a Git URL - Unity - Manual
The Package Manager can load a package from a Git repository on a remote ... If Unity was not able to install the...
Read more >
No 'git' executable was found. Please install Git ... - Unity Forum
Since the Package Manager uses the Git executable installed on your machine. Any global or system configuration or environment variable will ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found