DrozmotiX/ioBroker.esphome

Installation fails with npm code 1.

Closed this issue · 2 comments

I tried several times to install the adapter via the github symbol of iobroker admin panel. I updated all dependencys i cound find in the container but it still does not work and i can not make any sense out of the log file.

I use iobroker in a docker container running on a RPI4.

0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@8.15.0
2 info using node@v16.17.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 6ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 11ms
6 timing config:load:builtin Completed in 11ms
7 timing config:load:cli Completed in 47ms
8 timing config:load:env Completed in 1ms
9 timing config:load:project Completed in 28ms
10 timing config:load:file:/opt/iobroker/.npmrc Completed in 18ms
11 timing config:load:user Completed in 19ms
12 timing config:load:file:/usr/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 2ms
14 timing config:load:validate Completed in 1ms
15 timing config:load:credentials Completed in 3ms
16 timing config:load:setEnvs Completed in 3ms
17 timing config:load Completed in 126ms
18 timing npm:load:configload Completed in 127ms
19 timing npm:load:mkdirpcache Completed in 3ms
20 timing npm:load:mkdirplogs Completed in 1ms
21 verbose title npm install DrozmotiX/ioBroker.esphome#b6adb149202b81607fe1d726bbe7ffa6717d2352
22 verbose argv "install" "DrozmotiX/ioBroker.esphome#b6adb149202b81607fe1d726bbe7ffa6717d2352"
23 timing npm:load:setTitle Completed in 3ms
24 timing config:load:flatten Completed in 12ms
25 timing npm:load:display Completed in 15ms
26 verbose logfile logs-max:10 dir:/opt/iobroker/.npm/_logs
27 verbose logfile /opt/iobroker/.npm/_logs/2022-09-04T19_59_20_253Z-debug-0.log
28 timing npm:load:logFile Completed in 18ms
29 timing npm:load:timers Completed in 0ms
30 timing npm:load:configScope Completed in 0ms
31 timing npm:load Completed in 172ms
32 timing arborist:ctor Completed in 5ms
33 silly logfile start cleaning logs, removing 3 files
34 silly logfile done cleaning log files
35 timing idealTree:init Completed in 2599ms
36 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/iobroker.admin
37 http fetch GET 200 https://codeload.github.com/DrozmotiX/ioBroker.esphome/tar.gz/b6adb149202b81607fe1d726bbe7ffa6717d2352 1265ms (cache revalidated)
38 timing idealTree Completed in 106647ms
39 timing command:install Completed in 106726ms
40 verbose stack Error: git dep preparation failed
40 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
40 verbose stack at ChildProcess.emit (node:events:513:28)
40 verbose stack at maybeClose (node:internal/child_process:1093:16)
40 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
41 verbose cwd /opt/iobroker
42 verbose Linux 5.10.103-v7l+
43 verbose node v16.17.0
44 verbose npm v8.15.0
45 error code 1
46 error git dep preparation failed
47 error command /usr/bin/node /usr/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/opt/iobroker/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
48 error > iobroker.esphome@0.2.4 install
48 error > npip install
48 error
48 error No python_modules directory; installing pip locally if needed.
48 error Successfully completed pip check.
48 error Collecting esphome>=2021.8
48 error Using cached esphome-2022.8.1-py2.py3-none-any.whl (2.3 MB)
48 error Collecting tornado>=3.2
48 error Using cached tornado-6.2.tar.gz (504 kB)
48 error Installing build dependencies: started
48 error Installing build dependencies: finished with status 'done'
48 error Getting requirements to build wheel: started
48 error Getting requirements to build wheel: finished with status 'done'
48 error Preparing metadata (pyproject.toml): started
48 error Preparing metadata (pyproject.toml): finished with status 'done'
48 error Collecting esphome-dashboard==20220508.0
48 error Using cached esphome_dashboard-20220508.0-py3-none-any.whl (601 kB)
48 error Collecting tzdata>=2021.1
48 error Using cached tzdata-2022.2-py2.py3-none-any.whl (336 kB)
48 error Collecting esptool==3.3.1
48 error Using cached esptool-3.3.1-py3-none-any.whl
48 error Collecting tornado>=3.2
48 error Using cached tornado-6.1-cp39-cp39-linux_armv7l.whl
48 error Collecting colorama==0.4.5
48 error Using cached colorama-0.4.5-py2.py3-none-any.whl (16 kB)
48 error Collecting kconfiglib==13.7.1
48 error Using cached kconfiglib-13.7.1-py2.py3-none-any.whl (145 kB)
48 error Collecting aioesphomeapi==10.11.0
48 error Using cached aioesphomeapi-10.11.0-py2.py3-none-any.whl (51 kB)
48 error Collecting voluptuous==0.13.1
48 error Using cached voluptuous-0.13.1-py3-none-any.whl (29 kB)
48 error Collecting click==8.1.3
48 error Using cached click-8.1.3-py3-none-any.whl (96 kB)
48 error Collecting tzlocal==4.2
48 error Using cached tzlocal-4.2-py3-none-any.whl (19 kB)
48 error Collecting zeroconf==0.39.0
48 error Using cached zeroconf-0.39.0-py3-none-any.whl (106 kB)
48 error Collecting paho-mqtt==1.6.1
48 error Using cached paho_mqtt-1.6.1-py3-none-any.whl
48 error Collecting pyserial==3.5
48 error Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
48 error Collecting platformio==6.0.2
48 error Using cached platformio-6.0.2-py3-none-any.whl
48 error Collecting PyYAML==6.0
48 error Using cached PyYAML-6.0-cp39-cp39-linux_armv7l.whl
48 error Collecting noiseprotocol<1.0,>=0.3.1
48 error Using cached noiseprotocol-0.3.1-py3-none-any.whl (20 kB)
48 error Collecting protobuf<4.0,>=3.12.2
48 error Using cached protobuf-3.20.1-py2.py3-none-any.whl (162 kB)
48 error Collecting bitstring>=3.1.6
48 error Using cached bitstring-3.1.9-py3-none-any.whl (38 kB)
48 error Collecting cryptography>=2.1.4
48 error Using cached cryptography-37.0.4.tar.gz (585 kB)
48 error Installing build dependencies: started
48 error Installing build dependencies: finished with status 'done'
48 error Getting requirements to build wheel: started
48 error Getting requirements to build wheel: finished with status 'error'
49 error npm WARN using --force Recommended protections disabled.
49 error npm WARN old lockfile
49 error npm WARN old lockfile The package-lock.json file was created with an old version of npm,
49 error npm WARN old lockfile so supplemental metadata must be fetched from the registry.
49 error npm WARN old lockfile
49 error npm WARN old lockfile This is a one-time fix-up, please be patient...
49 error npm WARN old lockfile
49 error npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
49 error npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
49 error npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
49 error npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
49 error npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
49 error error: subprocess-exited-with-error
49 error
49 error × Getting requirements to build wheel did not run successfully.
49 error │ exit code: 1
49 error ╰─> [29 lines of output]
49 error
49 error =============================DEBUG ASSISTANCE==========================
49 error If you are seeing an error here please try the following to
49 error successfully install cryptography:
49 error
49 error Upgrade to the latest pip and try again. This will fix errors for most
49 error users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
49 error =============================DEBUG ASSISTANCE==========================
49 error
49 error Traceback (most recent call last):
49 error File "/opt/iobroker/.npm/_cacache/tmp/git-clone2LCGlO/python_modules/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in
49 error main()
49 error File "/opt/iobroker/.npm/_cacache/tmp/git-clone2LCGlO/python_modules/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
49 error json_out['return_val'] = hook(**hook_input['kwargs'])
49 error File "/opt/iobroker/.npm/_cacache/tmp/git-clone2LCGlO/python_modules/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
49 error return hook(config_settings)
49 error File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 149, in get_requires_for_build_wheel
49 error return self._get_build_requires(
49 error File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 130, in _get_build_requires
49 error self.run_setup()
49 error File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 145, in run_setup
49 error exec(compile(code, file, 'exec'), locals())
49 error File "setup.py", line 14, in
49 error from setuptools_rust import RustExtension
49 error File "/tmp/pip-build-env-qgw6dikx/overlay/lib/python3.9/site-packages/setuptools_rust/init.py", line 1, in
49 error from .build import build_rust
49 error File "/tmp/pip-build-env-qgw6dikx/overlay/lib/python3.9/site-packages/setuptools_rust/build.py", line 23, in
49 error from setuptools.command.build import build as CommandBuild # type: ignore[import]
49 error ModuleNotFoundError: No module named 'setuptools.command.build'
49 error [end of output]
49 error
49 error note: This error originates from a subprocess, and is likely not a problem with pip.
49 error error: subprocess-exited-with-error
49 error
49 error × Getting requirements to build wheel did not run successfully.
49 error │ exit code: 1
49 error ╰─> See above for output.
49 error
49 error note: This error originates from a subprocess, and is likely not a problem with pip.
49 error npm ERR! code 1
49 error npm ERR! path /opt/iobroker/.npm/_cacache/tmp/git-clone2LCGlO
49 error npm ERR! command failed
49 error npm ERR! command sh /tmp/install-478da927.sh
49 error
49 error npm ERR! A complete log of this run can be found in:
49 error npm ERR! /opt/iobroker/.npm/_logs/2022-09-04T19_59_35_161Z-debug-0.log
50 verbose exit 1
51 timing npm Completed in 108439ms
52 verbose unfinished npm timer reify 1662321561924
53 verbose unfinished npm timer reify:loadTrees 1662321561969
54 verbose unfinished npm timer idealTree:userRequests 1662321564584
55 verbose code 1
56 error A complete log of this run can be found in:
56 error /opt/iobroker/.npm/_logs/2022-09-04T19_59_20_253Z-debug-0.log<

I guess its the 32bit problem mentioned in the iobroker forums here: https://forum.iobroker.net/topic/54265/esphome-error-process-exited-with-code-25/108 -> It seems ESPHOME adapter will not install when the used Raspberry OS is a 32bit one (like ARMv71 , you see when you do a "uname -m" on raspberry), there is often a problem writing to the /tmp/ folder (permission denied). - As soon as the Host-OS is a 64bit one (like ARMv8 on raspberry) the installation of the ESPHOME adapter will run fine. - You mentioned you are running this inside a docker container on a RPI4, so please check if there is a chance this will also fix if you get the container/RPI4 to 64bit. So at the moment the only way to get it running is to make a iobroker BACKUP with the backup-adapter, reinstall iobroker on a 64bit OS, and after that: Restore your iobroker backup on that 64bit machine. - Then normaly ESPHOME adapter will install without problems.

The problem for me is, switching to 64bit I no option on the RPI. But in the meantime I saw the need for more power and got a used x86_64 machine. I will test the install the once I have that one running.