Esphome could not find package.json

Hello !

esphome n00b here.
I have a esp8266 nodemcu with dht11 connected and works fine using arduino IDE, next step was to pull it into hassi
Found out esphome is made for that but got stuck rather fast.
This is what I get when trying to upload to the ep8266 nodemcu, not sure where to start digging

INFO Reading configuration /config/esphome/p.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing p (board: esp01_1m; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
--------------------------------------------------------------------------------
Error: Could not find one of 'package.json' manifest files in the package

4 Likes

I have the same problem and still no solution. Even the simplest script is not working.

After several attempts deleting the addon or creating dummy yamls I’ve found a solution.
I’ve delete all the hidden esphome devices in ha. (mybe the solution works even without this step…)

After this I’ve backuped my device-yamls and the secrets.yaml via ssh from the /root/config/esphome folder and deleted the esphome add-on via ui and! the esphome folders in /root/config via ssh.

After this i have reinstalled the esp home addon via ui and copied the device-yamls back via ssh in the /root/config/esphome folder. With starting the new installed esphome addon it has found all my device-yamls and i could proceed installing them with new features.

Hi. Where I can find the “hidden” esphome devices?
Settings, Devices, ESPHome? I have 1 working, and 1 with same error as you.
Or it is in esp folder? I can see many attempts (different names) for adding the ESP32 that could not install.

I think this must be a regression in a recent release for esp32dev devices. Even recreating the device didn’t help me. What did help for me was changing the framework from arduino to esp-idf:

image

More details in the docs here: ESP32 Platform — ESPHome

Hope this helps someone else.

3 Likes

Did you resolve this if so where did you find them as I have same issue?

This is still stuck for me too… I tried the Arduino to esp-idf and that did not work either.

Same error here.
I was able to solve with this:

esp32:
  board: esp32dev
  framework:
    type: arduino
    version: 2.0.6 #https://github.com/espressif/arduino-esp32/releases
    #version: recommended

The only setup that works for all my ESPs was type: arduino and version: 2.0.0+.

4 Likes

hello ! may I kindly know where to access the framework? I have been scratching my head about it for 3 days now. also a n00b here, would really appreciate it !!

had the same error while compiling esp32 (esp8266 were processed without a problem).
Just uninstalled the ESPHome addon and installed it back.
All back to normal.

INFO Reading configuration /config/esphome/esp32-node-1.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp32-node-1 (board: nodemcu-32s; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
Library Manager: Installing esphome/AsyncTCP-esphome @ 1.2.2
INFO Installing esphome/AsyncTCP-esphome @ 1.2.2
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
1 Like

I checked with a clean new install in another RPi I had, and worked well, so decided to remove ESPHome and install again. As the working ESP32 still “connected” to my network, Home Assistant still recognizes it and can be used as before, but after installing ESPHome again, find that can’t edit that working device. Otherwise, I still have the script for configuring it again (think by cable). NEW DEVICES WORKING FINE FROM BEGINNING and can edit every one “except the first one”. All working and still don’t reconfigured the old one, but is working and don’t care “from now” (I want to add a sensor, in that moment will configure it again).

HI.

Has anyone figured out how to fix this? Not reinstalling it.

Thanks in advance.

My esphome is in docker container so I removed build and platformio directories from /config/.esphome. It seem to fixed a problem. I think the problem is with cache Upload Error > Could not find one of 'package.json' manifest files in the package - Development Platforms - PlatformIO Community
So actually you could remove /config/.esphome/platformio/cache dir and check if this work as if you nuke everything, you will need to wait till the esp downloads all the files

1 Like

Anyway, the best way is to uninstall and reinstall esphome. Just download each device.yaml that contains the “secret” for reinstall the devices if HA doens’t do it in automatic way.

Paul

Hey there! I allow myself to dig out the thread since I always found half of an answer for my problem.

Got the same error, it appears it happens when an install failed somehow creating a weird state. If that’s the case, that sounds like a corrupted download or incomplete build. That’s my guess since it happened on my first hands on ESPHome, so the setup was pretty fresh.

To solve it, I removed the addon AND the files /config/.storage/esphome*, then reinstalling the addon.
For me, it makes no sense to delete de /config/esphome, there is no “state” stored here, only your devices configurations. So it safe to leave your secrets and config where they are :wink:

I tested many things, many sequences, but this one saved my day :slight_smile:

1 Like

For this, it works when I uninstall and reinstall the espHOME